Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
Defines a part of a complete 3D Model.

Namespace: Visual3D.Graphics3D
Assembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
[SerializableAttribute]
public class ModelPart : INamed, IComponent, 
	IDisposable
<SerializableAttribute> _
Public Class ModelPart _
	Implements INamed, IComponent, IDisposable

Members

                  
 All Members  Constructors   Fields   Properties   Methods   Events  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
ModelPart()()()()
Initializes a new instance of the ModelPart class
ModelPart(String)
Initializes a new instance of the ModelPart class
AddBoneAssignment(BoneVertexAssignment)
Assigns a vertex to a bone with a given weight, for skeletal animation.
AnimationSettings
Returns type of animation used to render geometry contained in this ModelPart. If animation type cannot be determined for any reason, returns AnimationTypeAndWeights.NoAnimation
BaseLocalSpatial
Spatial Offset of this Model Part as dictated by the Source Model (from which it was imported).
BoneVertexAssignments
Returns IEnumerable interface for vertex-to-bone assignments used for Ogre skeletal geometry for this model part.
CanInstancingBeUsed()()()()
Checks whether or not this model part can be rendered via Batch, based on vertex format.
CreateNewMaterial()()()()
Dispose()()()()
GenerateLODGeometry()()()()
Generate geometry LOD for this ModelPart.
GenerateLODGeometry(Int32)
Generate geometry LOD at given level of detail for this ModelPart.
Geometry
GetBoundingBox()()()()
GetBoundingBox(BoundingBox%, Boolean)
Returns own bounding box of the ModelPart.
GetIndexData(Int32)
GetIndices(List<(Of <<'(UInt32>)>>))
GetIndicesToBuffer(array<UInt32>[]()[][], Int32, Int32)
Read index buffer.
GetPN(List<(Of <<'(Vector3>)>>))
Get Vertex Position/Normal
GetPNT(List<(Of <<'(VertexPositionNormalTexture>)>>))
Get Vertex Position/Normal/Texture coordinates
GetRenderableGeometry(GeometryData)
GetRenderableGeometry(GeometryData, Int32)
Fills a GeometryData structure required to render this model.
GetScaledBoundingBox()()()()
Returns own bounding box of the ModelPart.
GetTexCoord(List<(Of <<'(Vector2>)>>))
GetUshortIndexDataToInts(IndexBuffer, Int32, array<UInt32>[]()[][], Int32, Int32)
NOTE: Uses IHugeMemoryService.GetLargeUInt16Buffer.
GetVertexData()()()()
GetVertexData(Int32)
GetVertices(List<(Of <<'(Vector3>)>>), Boolean)
"transformToModelSpace=true" => Local transforms are applied. "=false" => raw vertices.
HasBoneAssignments
Gets/Sets if ModelPart has associated Bone Assignments.
HasVertexData
IndexData
Index data for the most detailed LOD of this model part
IsAnimationShaderDisabled
IsCustomizedAfterImport
IsInstancingUsed
Gets/sets whether instancing is preferred to render this model part. Default is false.
IsVisible
IsVisibleOverride
LocalOrientation
Final rotation of the ModelPart in local space of the Model. In case if W part contains value equal to Quats.EulerMarker value, this quaternion must be converted from Euler form to natural Quaternion with Quats.FromEulerQuat method. Default is Quaternion.Identity. When ModelPart is used to create ActorPart from, this value takes part in the initial ActorPart.LocalTransform matrix.
LocalRotation
Final rotation of the ModelPart in local space of the Model. In case if W part contains value equal to Quats.EulerMarker value, this quaternion must be converted from Euler form to natural Quaternion with Quats.FromEulerQuat method. Default is Quaternion.Identity. When ModelPart is used to create ActorPart from, this value takes part in the initial ActorPart.LocalTransform matrix.
LocalScale
Final scale of the ModelPart in local space of the Model. Default is Vector3.One. When ModelPart is used to create ActorPart from, this value takes part in the initial ActorPart.LocalTransform matrix.
LocalTransform
Resulting Local Transform from transforming the BaseLocalSpatial by the Model and Part SpatialAdjustments.
LocalTransformChanged
Fires in response to LocalScale, LocalTranslation or LocalOrientation property change.
LocalTranslation
Final Local Position of the ModelPart origin in local space of the Model. Default is Vector3.Zero. When ModelPart is used to create ActorPart from, this value takes part in the initial ActorPart.LocalTransform matrix.
LodIndexData
Gets/sets the list of index data for each level of detail for this model part, except of LOD0.
LodVertexData
Gets/sets the list of vertex data for each level of detail for this model part, except of LOD0.
Material
MaterialName
Gets/sets name of material for this model part.
MaterialRef
Name
Name of model part.
NumBoneAssignments
Gets number of BoneAssignments
ParentModel
Parent Model of ModelPart
PartIndex
PrimitiveCount
PrimitiveType
Gets/sets the type of primitives this model part consists of (triangle list, triangle strip, line list etc).
SetBoundingBox(BoundingBox)
SetLODGeometry(Model..::..LodUsage, GeometryData)
SetUshortIndexDataFromInts(IndexBuffer, array<Int32>[]()[][], Int32, Int32)
NOTE: Uses IHugeMemoryService.GetLargeUInt16Buffer.
SpatialAdjustment
Additional Spatial Adjustment added to the BaseLocalSpatial value (often user-edited).
ToString()()()() (Overrides Object..::..ToString()()()().)
ToString(String, Object)
UseAllTrackedPropertiesIfCustomized
UseSharedVertices
Indicates if this modelPart shares vertex data with other models or whether it has its own vertices.
VertexCount
VertexData
Vertex buffers containing geometry of the model part

Remarks

Prototypes which make up the definition of a discrete 3D object are made up of potentially multiple parts. This is because different parts of the model may use different materials or use different vertex formats, such that a rendering state change is required between them.

Like the Model class, instatiations of 3D objects in the scene share the ModelPart instances, and have the option of overriding their material differences on a per-object basis if required. See the ActorPart class for more information.

Inheritance Hierarchy

System..::..Object
  Visual3D.Graphics3D..::..ModelPart

See Also