Class TAbstractShapeNode
Unit
Declaration
type TAbstractShapeNode = class(TAbstractChildNode)
Description
Base node type for all Shape nodes.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractChildNode
- TAbstractShapeNode
Overview
Fields
![]() |
InternalWasVisibleFrameId: TFrameId; |
Methods
![]() |
function DirectEnumerateActive(Func: TEnumerateChildrenFunction): Pointer; override; |
![]() |
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
![]() |
procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override; |
![]() |
procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override; |
![]() |
function CommonSurfaceShader: TCommonSurfaceShaderNode; deprecated 'use TMaterialNode instead of TCommonSurfaceShaderNode (it has the same functionality and is standardized in X3D v4)'; |
![]() |
function WasVisible: Boolean; |
![]() |
procedure CreateNode; override; |
![]() |
class function ClassX3DType: String; override; |
Properties
![]() |
property Texture: TAbstractTextureNode read GetTexture write SetTexture; deprecated 'create and assign texture node instance explicitly, then set Appearance.Texture'; |
![]() |
property TextureTransform: TAbstractTextureTransformNode
read GetTextureTransform write SetTextureTransform; deprecated 'create and assign texture transformatiom node instance explicitly, then set Appearance.TextureTransform'; |
![]() |
property Material: TAbstractMaterialNode read GetMaterial write SetMaterial; deprecated 'create and assign TAppearanceNode instance explicitly, then set Appearance.Material'; |
![]() |
property LineProperties: TLinePropertiesNode
read GetLineProperties write SetLineProperties; deprecated 'create and assign TLinePropertiesNode instance explicitly, then set Appearance.LineProperties'; |
![]() |
property FdAppearance: TSFNode read FFdAppearance; |
![]() |
property Appearance: TAppearanceNode read GetAppearance write SetAppearance; |
![]() |
property FdGeometry: TSFNode read FFdGeometry; |
![]() |
property Geometry: TAbstractGeometryNode read GetGeometry write SetGeometry; |
![]() |
property FdBboxCenter: TSFVec3f read FFdBboxCenter; |
![]() |
property BBox: TBox3D read GetBBox write SetBBox; |
![]() |
property FdBboxSize: TSFVec3f read FFdBboxSize; |
![]() |
property FdShading: TSFStringEnum read FFdShading; |
![]() |
property Shading: TShading read GetShading write SetShading; |
![]() |
property FdVisible: TSFBool read FFdVisible; |
![]() |
property Visible: Boolean read GetVisible write SetVisible; |
![]() |
property FdCollision: TSFStringEnum read FFdCollision; |
![]() |
property Collision: TShapeCollision read GetCollision write SetCollision; |
![]() |
property Render: Boolean read GetVisible write SetVisible default true; deprecated 'use Visible'; |
Description
Fields
![]() |
InternalWasVisibleFrameId: TFrameId; |
Methods
![]() |
function DirectEnumerateActive(Func: TEnumerateChildrenFunction): Pointer; override; |
![]() |
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
![]() |
procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override; |
![]() |
procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override; |
![]() |
function CommonSurfaceShader: TCommonSurfaceShaderNode; deprecated 'use TMaterialNode instead of TCommonSurfaceShaderNode (it has the same functionality and is standardized in X3D v4)'; |
Warning: this symbol is deprecated: use TMaterialNode instead of TCommonSurfaceShaderNode (it has the same functionality and is standardized in X3D v4)
Find a suitable |
![]() |
procedure CreateNode; override; |
Create node fields and events. |
![]() |
class function ClassX3DType: String; override; |
Properties
![]() |
property Texture: TAbstractTextureNode read GetTexture write SetTexture; deprecated 'create and assign texture node instance explicitly, then set Appearance.Texture'; |
Warning: this symbol is deprecated: create and assign texture node instance explicitly, then set Appearance.Texture
The texture of this shape. This is a shortcut for accessing "texture" field of Appearance, that is When setting this to something non-nil, we make sure to also set Appearance to something non-nil. |
![]() |
property TextureTransform: TAbstractTextureTransformNode
read GetTextureTransform write SetTextureTransform; deprecated 'create and assign texture transformatiom node instance explicitly, then set Appearance.TextureTransform'; |
Warning: this symbol is deprecated: create and assign texture transformatiom node instance explicitly, then set Appearance.TextureTransform Texture transformation of this shape. Similar to Texture, this is just a comfortable property for getting and setting the appropriate Appearance field, checking class types along the way. |
![]() |
property Material: TAbstractMaterialNode read GetMaterial write SetMaterial; deprecated 'create and assign TAppearanceNode instance explicitly, then set Appearance.Material'; |
Warning: this symbol is deprecated: create and assign TAppearanceNode instance explicitly, then set Appearance.Material
Get / set the material of this shape. This is a shortcut to access Appearance and then set |
![]() |
property LineProperties: TLinePropertiesNode
read GetLineProperties write SetLineProperties; deprecated 'create and assign TLinePropertiesNode instance explicitly, then set Appearance.LineProperties'; |
Warning: this symbol is deprecated: create and assign TLinePropertiesNode instance explicitly, then set Appearance.LineProperties Line properties of this shape. This is a clean, type-safe way for accessing Appearance.lineProperties field of this shape. |
![]() |
property FdAppearance: TSFNode read FFdAppearance; |
Internal wrapper for property |
![]() |
property Appearance: TAppearanceNode read GetAppearance write SetAppearance; |
![]() |
property FdGeometry: TSFNode read FFdGeometry; |
Internal wrapper for property |
![]() |
property Geometry: TAbstractGeometryNode read GetGeometry write SetGeometry; |
![]() |
property FdBboxCenter: TSFVec3f read FFdBboxCenter; |
Internal wrapper for property |
![]() |
property BBox: TBox3D read GetBBox write SetBBox; |
You can provide a manually-calculated bounding box of the shape here, for optimization purposes. Leave this field as empty (TBox3D.Empty) to let the engine calculate best bounding box automatically. Manually providing the bounding box makes sense if you can do it more efficiently than the engine. E.g. if the shape vertexes are animated, then the engine would have to recalcualate the perfect bounding box every frame. It is more efficient to calculate a bounding box of all possible animation frames, and store it here. The glTF skinned animation automatically fills this field for the affected shapes. Note: This property is not useful if you want to know the bounding box of a shape, calculated by the engine. This property only allows to override the automatic engine calculation. To read the calculated bounding box, load the nodes to TCastleScene. You can then use Scene.BoundingBox, Scene.LocalBoundingBox, Scene.WorldBoundingBox to know bounding box of the scene. To get bounding box of a particular shape, enumerate TCastleSceneCore.Shapes to find the correct shape (using any criteria you want – note that the same TShapeNode may be reused multiple times), and then read TShape.BoundingBox, TShape.LocalBoundingBox. |
![]() |
property FdBboxSize: TSFVec3f read FFdBboxSize; |
Internal wrapper for property |
![]() |
property FdShading: TSFStringEnum read FFdShading; |
Internal wrapper for property |
![]() |
property Shading: TShading read GetShading write SetShading; |
How to display given shape. |
![]() |
property FdVisible: TSFBool read FFdVisible; |
Internal wrapper for property |
![]() |
property Visible: Boolean read GetVisible write SetVisible; |
Is the shape visible. Shapes that are not visible are not rendered, but otherwise are still processed (for example, hidden shapes are still used for collision detection). Toggling this is guaranteed to be ultra-fast. Note: An alternative method to hide (and more) things in X3D is to wrap them in a TSwitchNode, and toggle TSwitchNode.WhichChoice between -1 and 0. When TSwitchNode.WhichChoice is -1, the children are not processed (not rendered, and do not collide). |
![]() |
property FdCollision: TSFStringEnum read FFdCollision; |
Internal wrapper for property |
![]() |
property Collision: TShapeCollision read GetCollision write SetCollision; |
How does the given shape collide. This only matters if TCastleSceneCore.PreciseCollisions is |
![]() |
property Render: Boolean read GetVisible write SetVisible default true; deprecated 'use Visible'; |
Warning: this symbol is deprecated: use Visible Deprecated name for Visible. |
Generated by PasDoc 0.16.0.