C# 클래스 Axiom.Core.InstancedGeometry

Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene Shader instancing allows to save both memory and draw calls. While StaticGeometry stores 500 times the same object in a batch to display 500 objects, this shader instancing implementation stores only 80 times the object, and then re-uses the vertex data with different shader parameter. Although you save memory, you make more draw call. However, you still make less draw calls than if you were rendering each object independently. Plus, you can move the batched objects independently of one another which you cannot do with StaticGeometry.
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
mBatchInstanceDimensions Vector3
mBuilt bool
mCastShadows bool
mHalfBatchInstanceDimensions Vector3
mName String
mOrigin Vector3
mOwner SceneManager
mSquaredUpperDistance float
mUpperDistance float
mVisible bool

공개 메소드들

메소드 설명
AddEntity ( Entity ent, Vector3 position ) : void
AddEntity ( Entity ent, Vector3 position, Quaternion orientation ) : void
AddEntity ( Entity ent, Vector3 position, Quaternion orientation, Vector3 scale ) : void

Adds an Entity to the static geometry. This method takes an existing Entity and adds its details to the list of elements to include when building. Note that the Entity itself is not copied or referenced in this method; an Entity is passed simply so that you can change the materials of attached SubEntity objects if you want. You can add the same Entity instance multiple times with different material settings completely safely, and destroy the Entity before destroying this InstancedGeometry if you like. The Entity passed in is simply Must be called before 'Build'.

AddEntity ( Entity ent, Vector3 position, Vector3 scale ) : void
AddSceneNode ( SceneNode node ) : void

adds all the Entity objects attached to a SceneNode and all it's children to the static geometry. This method performs just like addEntity, except it adds all the entities attached to an entire sub-tree to the geometry. The position / orientation / scale parameters are taken from the node structure instead of being specified manually.

DetermineGeometry ( SubMesh sm ) : List

Look up or calculate the geometry data to use for this SubMesh

InstancedGeometry ( SceneManager owner, String name ) : System
SplitGeometry ( VertexData vd, IndexData id, Axiom.Core.SubMeshLodGeometryLink &targetGeomLink ) : void

Split some shared geometry into dedicated geometry.

비공개 메소드들

메소드 설명
BuildIndexRemap ( uint pBuffer, int numIndexes, int>.Dictionary &remap ) : void
BuildIndexRemap ( ushort pBuffer, int numIndexes, int>.Dictionary &remap ) : void
RemapIndexes ( uint src, uint dst, int>.Dictionary &remap, int numIndexes ) : void
RemapIndexes ( ushort src, ushort dst, int>.Dictionary &remap, int numIndexes ) : void

메소드 상세

AddEntity() 공개 메소드

public AddEntity ( Entity ent, Vector3 position ) : void
ent Entity
position Vector3
리턴 void

AddEntity() 공개 메소드

public AddEntity ( Entity ent, Vector3 position, Quaternion orientation ) : void
ent Entity
position Vector3
orientation Axiom.Math.Quaternion
리턴 void

AddEntity() 공개 메소드

Adds an Entity to the static geometry. This method takes an existing Entity and adds its details to the list of elements to include when building. Note that the Entity itself is not copied or referenced in this method; an Entity is passed simply so that you can change the materials of attached SubEntity objects if you want. You can add the same Entity instance multiple times with different material settings completely safely, and destroy the Entity before destroying this InstancedGeometry if you like. The Entity passed in is simply Must be called before 'Build'.
public AddEntity ( Entity ent, Vector3 position, Quaternion orientation, Vector3 scale ) : void
ent Entity The Entity to use as a definition (the Mesh and Materials /// referenced will be recorded for the build call).
position Vector3 The world position at which to add this Entity
orientation Axiom.Math.Quaternion The world orientation at which to add this Entity
scale Vector3
리턴 void

AddEntity() 공개 메소드

public AddEntity ( Entity ent, Vector3 position, Vector3 scale ) : void
ent Entity
position Vector3
scale Vector3
리턴 void

AddSceneNode() 공개 메소드

adds all the Entity objects attached to a SceneNode and all it's children to the static geometry. This method performs just like addEntity, except it adds all the entities attached to an entire sub-tree to the geometry. The position / orientation / scale parameters are taken from the node structure instead of being specified manually.
public AddSceneNode ( SceneNode node ) : void
node SceneNode
리턴 void

DetermineGeometry() 공개 메소드

Look up or calculate the geometry data to use for this SubMesh
public DetermineGeometry ( SubMesh sm ) : List
sm SubMesh
리턴 List

InstancedGeometry() 공개 메소드

public InstancedGeometry ( SceneManager owner, String name ) : System
owner SceneManager
name String
리턴 System

SplitGeometry() 공개 메소드

Split some shared geometry into dedicated geometry.
public SplitGeometry ( VertexData vd, IndexData id, Axiom.Core.SubMeshLodGeometryLink &targetGeomLink ) : void
vd Axiom.Graphics.VertexData
id Axiom.Graphics.IndexData
targetGeomLink Axiom.Core.SubMeshLodGeometryLink
리턴 void

프로퍼티 상세

mBatchInstanceDimensions 보호되어 있는 프로퍼티

protected Vector3 mBatchInstanceDimensions
리턴 Vector3

mBuilt 보호되어 있는 프로퍼티

protected bool mBuilt
리턴 bool

mCastShadows 보호되어 있는 프로퍼티

protected bool mCastShadows
리턴 bool

mHalfBatchInstanceDimensions 보호되어 있는 프로퍼티

protected Vector3 mHalfBatchInstanceDimensions
리턴 Vector3

mName 보호되어 있는 프로퍼티

protected String mName
리턴 String

mOrigin 보호되어 있는 프로퍼티

protected Vector3 mOrigin
리턴 Vector3

mOwner 보호되어 있는 프로퍼티

protected SceneManager,Axiom.Core mOwner
리턴 SceneManager

mSquaredUpperDistance 보호되어 있는 프로퍼티

protected float mSquaredUpperDistance
리턴 float

mUpperDistance 보호되어 있는 프로퍼티

protected float mUpperDistance
리턴 float

mVisible 보호되어 있는 프로퍼티

protected bool mVisible
리턴 bool