Base entity for 3D objects. Usually used in Meshes or Models, both normally Actors.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering3D Entity3D
DeltaEngine.Rendering3D Billboard
DeltaEngine.Rendering3D HierarchyEntity3D
DeltaEngine.Rendering3D.Shapes Circle3D
DeltaEngine.Rendering3D.Shapes Grid3D
DeltaEngine.Rendering3D.Shapes Line3D
Namespace: DeltaEngine.Rendering3D
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Entity3D type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Entity3D(Vector3D) | Initializes a new instance of the Entity3D class | |
Entity3D(Vector3D, Quaternion) | Initializes a new instance of the Entity3D class |
Methods
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
lastOrientation | ||
lastPosition | ||
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
IsActive | (Inherited from DrawableEntity.) | |
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
NumberOfComponents | (Inherited from Entity.) | |
Orientation | ||
Position | ||
RenderLayer | (Inherited from DrawableEntity.) | |
Scale | ||
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void CreateEntity3D() { var entity = new Entity3D(Vector3D.Zero); entity.Add(Rectangle.One); Assert.AreEqual(Vector3D.Zero, entity.Position); Assert.AreEqual(Quaternion.Identity, entity.Orientation); Assert.IsTrue(entity.IsVisible); Assert.AreEqual(4, entity.GetComponentsForSaving().Count); }
[Test, CloseAfterFirstFrame] public void CreateEntity3DPositionAndOrientation() { var position = new Vector3D(10.0f, -3.0f, 27.0f); var orientation = Quaternion.Identity; var entity = new Entity3D(position, orientation); Assert.AreEqual(position, entity.Position); Assert.AreEqual(orientation, entity.Orientation); }
[Test, CloseAfterFirstFrame] public void SetAndGetEntity3DComponentsDirectly() { var entity = new Entity3D(Vector3D.Zero); entity.Set(Vector3D.One); Assert.AreEqual(Vector3D.One, entity.Get<Vector3D>()); entity.Set(Quaternion.Identity); Assert.AreEqual(Quaternion.Identity, entity.Get<Quaternion>()); }
See Also