7 #ifndef CAFU_TREE_HPP_INCLUDED
8 #define CAFU_TREE_HPP_INCLUDED
10 #include "Templates/Array.hpp"
11 #include "Math3D/Vector3.hpp"
12 #include "MaterialSystem/Mesh.hpp"
13 #include "Math3D/Matrix.hpp"
14 #include "Math3D/BoundingBox.hpp"
20 namespace MatSys {
class RenderMaterialT; }
73 BranchT ComputeBranch(
float RelPosOnParent,
char BranchLevel,
const PlantDescriptionT* TD,
const MatrixT& BranchMatrix,
unsigned long& NumOfAllBranchTriangles);
74 void DrawBranch(
const BranchT& Branch)
const;
75 void GetLeavesAfterLoD(
const BranchT& Branch,
ArrayT<unsigned long>& LeavesAfterLoD,
unsigned long& NrOfLeavesAfterLoD)
const;
87 TreeT() : BarkRenderMat(NULL) {}
The segment of a branch. A branch consits of one or more segments.
Definition: Tree.hpp:36
This class represents a surface render material.
Definition: RenderMaterial.hpp:25
TreeT()
Default-Constructor.
Definition: Tree.hpp:87
MatrixT Matrix
Transformationsmatrix fuer dieses Segment.
Definition: Tree.hpp:38
The leaf of a tree.
Definition: Tree.hpp:45
Contains a plant description that has all the information needed to create a plant.
Definition: PlantDescription.hpp:23
const BoundingBox3fT & GetTreeBounds() const
Returns the trees bounding box.
Definition: Tree.hpp:101
Describes a renderable tree.
Definition: Tree.hpp:27
This class represents a surface material ("A datastructural representation of a scripts material def...
Definition: Material.hpp:22
float RadiusAtRoot
Radius des Querschnitts dieses Segments an seiner Wurzel (am "Anfang").
Definition: Tree.hpp:39
bool UseRealBlendingForLeaves
Determines if the leaves are drawn using real alpha blending, or only a simple alpha test...
Definition: Tree.hpp:82
MatSys::RenderMaterialT * RenderMat
The render material used to render this leaf.
Definition: Tree.hpp:50
Vector3fT Origin
Der Leaf-Ursprung/Mittelpunkt/Aufhaengepunkt (in World-Coords).
Definition: Tree.hpp:47
unsigned long NrOfCoords
Number of vertices/texture coordinates of this segment.
Definition: Tree.hpp:41
unsigned long FirstCoordIndex
Index in the global tree vertices and texture coordinates array of the first vertice of this segment...
Definition: Tree.hpp:40
float Coords[8]
Rel. X/Y-Koord.paare bzgl. Origin fuer li. oben, re. oben, re. unten und li. unten (in World-Coords)...
Definition: Tree.hpp:48
bool DrawLeaves
When 'true', also the leaves are drawn. When 'false', the leaves are omitted from drawing...
Definition: Tree.hpp:81
void Draw() const
Draws the tree.
Definition: Tree.cpp:477
Definition: Renderer.hpp:16
float Color[3]
Die Farbe (Farbe+Dimming+Varianz), mit der die Texture dieses Leafs moduliert werden soll...
Definition: Tree.hpp:49