class ThreeDViewer.Entity¶
Overview¶
Represents an entity that can be show with the renderer and that has children. More…
class Entity { public: // properties Model Model; Vector3 Position; Vector3 Rotation; double Scale; EntityCollection Children; Entity Parent; bool IsRoot; bool IsLeaf; Matrix4 Transformation; Matrix4 AbsoluteTransformation; Model AbsoluteModel; // methods Entity(); Entity(Model model, Entity parent); Entity(Model model); };
Detailed Documentation¶
Represents an entity that can be show with the renderer and that has children.
Properties¶
Model Model
Gets or sets the 3D model of this entity.
Vector3 Position
Gets or sets the position of this entity.
Vector3 Rotation
Gets or sets the rotation in radian of this entity.
double Scale
Gets or sets the scale of this entity.
EntityCollection Children
Gets the children of this entity.
Entity Parent
Gets or sets the parent of this entity.
bool IsRoot
Gets a value indicating whether this entity is root or not.
bool IsLeaf
Gets a value indicating whether this entity is a leaf or not.
Matrix4 Transformation
Gets the relative transformation matrix of this entity. Contains the scale, rotation and translation of this entity.
Matrix4 AbsoluteTransformation
Gets the absolute transformation matrix of this entity. Contains the scale, rotation and translation of this entity multiplied by his parent’s. Gets Transformation if IsRoot is false.
Model AbsoluteModel
Gets the absolute model of this entity. Use this model to project and draw the entity.
Methods¶
Entity()
Initializes a new instance of the Entity class.
Entity(Model model, Entity parent)
Initializes a new instance of the Entity class.
Parameters:
model |
3D model of this entity. |
parent |
Parent of this entity. |
Entity(Model model)
Initializes a new instance of the Entity class.
Parameters:
model |
3D model of this entity. |