reckfellENGINE

GltfObjectModelProperty

Describes how to access a property as defined in the glTF object model.

On this page
class GltfObjectModelPropertyReckfellSharpInherits RefCounted

Describes how to access a property as defined in the glTF object model.

GLTFObjectModelProperty defines a mapping between a property in the glTF object model and a EntityPath in the Reckfell scene tree. This can be used to animate properties in a glTF file using the KHR_animation_pointer extension, or to access them through an engine-agnostic script such as a behavior graph as defined by the KHR_interactivity extension. The glTF property is identified by JSON pointer(s) stored in GltfObjectModelProperty.JsonPointers, while the Reckfell property it maps to is defined by GltfObjectModelProperty.EntityPaths. In most cases GltfObjectModelProperty.JsonPointers and GltfObjectModelProperty.EntityPaths will each only have one item, but in some cases a single glTF JSON pointer will map to multiple Reckfell properties, or a single Reckfell property will be mapped to multiple glTF JSON pointers, or it might be a many-to-many relationship. Expression objects can be used to define conversions between the data, such as when glTF defines an angle in radians and Reckfell uses degrees. The GltfObjectModelProperty.ObjectModelType property defines the type of data stored in the glTF file as defined by the object model, see GltfObjectModelProperty.GltfObjectModelType for possible values.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

GltfObjectModelPropertyConstructor
# GltfObjectModelProperty
C#
public GltfObjectModelProperty();

Properties6

EntityPathsProperty
# EntityPaths
C#
public Reckfell.Collections.Array<EntityPath> EntityPaths { get; set; }

An array of EntityPaths that point to a property, or multiple properties, in the Reckfell scene tree. On import, this will either be set by GltfDocument, or by a GltfDocumentExtension class. For simple cases, use GltfObjectModelProperty.AppendPathToProperty to add properties to this array. In most cases GltfObjectModelProperty.EntityPaths will only have one item, but in some cases a single glTF JSON pointer will map to multiple Reckfell properties. For example, a GltfCamera or GltfLight used on multiple glTF nodes will be represented by multiple Reckfell nodes.

GltfToReckfellExpressionProperty
# GltfToReckfellExpression
C#
public Expression GltfToReckfellExpression { get; set; }

If set, this Expression will be used to convert the property value from the glTF object model to the value expected by the Reckfell property. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If null, the value will be copied as-is.

JsonPointersProperty
# JsonPointers
C#
public Reckfell.Collections.Array<string[]> JsonPointers { get; set; }

The glTF object model JSON pointers used to identify the property in the glTF object model. In most cases, there will be only one item in this array, but specific cases may require multiple pointers. The items are themselves arrays which represent the JSON pointer split into its components.

ObjectModelTypeProperty
# ObjectModelType
C#
public GltfObjectModelProperty.GltfObjectModelType ObjectModelType { get; set; }

The type of data stored in the glTF file as defined by the object model. This is a superset of the available accessor types, and determines the accessor type.

ReckfellToGltfExpressionProperty
# ReckfellToGltfExpression
C#
public Expression ReckfellToGltfExpression { get; set; }

If set, this Expression will be used to convert the property value from the Reckfell property to the value expected by the glTF object model. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If null, the value will be copied as-is.

VariantTypeProperty
# VariantType
C#
public Variant.Type VariantType { get; set; }

The type of data stored in the Reckfell property. This is the type of the property that the GltfObjectModelProperty.EntityPaths point to.

Methods18

AppendEntityPathvoid
# AppendEntityPath
C#
public void AppendEntityPath(EntityPath entityPath);

Appends a EntityPath to GltfObjectModelProperty.EntityPaths. This can be used by GltfDocumentExtension classes to define how a glTF object model property maps to a Reckfell property, or multiple Reckfell properties. Prefer using GltfObjectModelProperty.AppendPathToProperty for simple cases. Be sure to also call GltfObjectModelProperty.SetTypes once (the order does not matter).

Parameters
NameTypeDefault
entityPathEntityPath—
AppendPathToPropertyvoid
# AppendPathToProperty
C#
public void AppendPathToProperty(EntityPath entityPath, StringName propName);

High-level wrapper over GltfObjectModelProperty.AppendEntityPath that handles the most common cases. It constructs a new EntityPath using entity_path as a base and appends prop_name to the subpath. Be sure to also call GltfObjectModelProperty.SetTypes once (the order does not matter).

Parameters
NameTypeDefault
entityPathEntityPath—
propNameStringName—
GetAccessorTypeGltfAccessor.GltfAccessorType
# GetAccessorType
C#
public GltfAccessor.GltfAccessorType GetAccessorType();

The GLTF accessor type associated with this property's GltfObjectModelProperty.ObjectModelType. See GltfAccessor.AccessorType for possible values, and see GltfObjectModelProperty.GltfObjectModelType for how the object model type maps to accessor types.

Returns GltfAccessor.GltfAccessorType
GetEntityPathsReckfell.Collections.Array<EntityPath>
# GetEntityPaths
C#
public Reckfell.Collections.Array<EntityPath> GetEntityPaths();
Returns Reckfell.Collections.Array<EntityPath>
GetGltfToReckfellExpressionExpression
# GetGltfToReckfellExpression
C#
public Expression GetGltfToReckfellExpression();
Returns Expression
GetJsonPointersReckfell.Collections.Array<string[]>
# GetJsonPointers
C#
public Reckfell.Collections.Array<string[]> GetJsonPointers();
Returns Reckfell.Collections.Array<string[]>
GetObjectModelTypeGltfObjectModelProperty.GltfObjectModelType
# GetObjectModelType
C#
public GltfObjectModelProperty.GltfObjectModelType GetObjectModelType();
Returns GltfObjectModelProperty.GltfObjectModelType
GetReckfellToGltfExpressionExpression
# GetReckfellToGltfExpression
C#
public Expression GetReckfellToGltfExpression();
Returns Expression
GetVariantTypeVariant.Type
# GetVariantType
C#
public Variant.Type GetVariantType();
Returns Variant.Type
HasEntityPathsbool
# HasEntityPaths
C#
public bool HasEntityPaths();

Returns true if GltfObjectModelProperty.EntityPaths is not empty. This is used during import to determine if a GltfObjectModelProperty can handle converting a glTF object model property to a Reckfell property.

Returns bool
HasJsonPointersbool
# HasJsonPointers
C#
public bool HasJsonPointers();

Returns true if GltfObjectModelProperty.JsonPointers is not empty. This is used during export to determine if a GltfObjectModelProperty can handle converting a Reckfell property to a glTF object model property.

Returns bool
SetEntityPathsvoid
# SetEntityPaths
C#
public void SetEntityPaths(Reckfell.Collections.Array<EntityPath> entityPaths);
Parameters
NameTypeDefault
entityPathsReckfell.Collections.Array<EntityPath>—
SetGltfToReckfellExpressionvoid
# SetGltfToReckfellExpression
C#
public void SetGltfToReckfellExpression(Expression gltfToReckfellExpr);
Parameters
NameTypeDefault
gltfToReckfellExprExpression—
SetJsonPointersvoid
# SetJsonPointers
C#
public void SetJsonPointers(Reckfell.Collections.Array<string[]> jsonPointers);
Parameters
NameTypeDefault
jsonPointersReckfell.Collections.Array<string[]>—
SetObjectModelTypevoid
# SetObjectModelType
C#
public void SetObjectModelType(GltfObjectModelProperty.GltfObjectModelType type);
Parameters
NameTypeDefault
typeGltfObjectModelProperty.GltfObjectModelType—
SetReckfellToGltfExpressionvoid
# SetReckfellToGltfExpression
C#
public void SetReckfellToGltfExpression(Expression reckfellToGltfExpr);
Parameters
NameTypeDefault
reckfellToGltfExprExpression—
SetTypesvoid
# SetTypes
C#
public void SetTypes(Variant.Type variantType, GltfObjectModelProperty.GltfObjectModelType objModelType);

Sets the GltfObjectModelProperty.VariantType and GltfObjectModelProperty.ObjectModelType properties. This is a convenience method to set both properties at once, since they are almost always known at the same time. This method should be called once. Calling it again with the same values will have no effect.

Parameters
NameTypeDefault
variantTypeVariant.Type—
objModelTypeGltfObjectModelProperty.GltfObjectModelType—
SetVariantTypevoid
# SetVariantType
C#
public void SetVariantType(Variant.Type variantType);
Parameters
NameTypeDefault
variantTypeVariant.Type—

GltfObjectModelProperty.GltfObjectModelType

ValueDescription
Bool = 1

Object model type "bool". Represented in the glTF JSON as a boolean, and encoded in a GltfAccessor as "SCALAR". When encoded in an accessor, a value of 0 is false, and any other value is true.

Float = 2

Object model type "float". Represented in the glTF JSON as a number, and encoded in a GltfAccessor as "SCALAR".

Float2 = 4

Object model type "float2". Represented in the glTF JSON as an array of two numbers, and encoded in a GltfAccessor as "VEC2".

Float2X2 = 7

Object model type "float2x2". Represented in the glTF JSON as an array of four numbers, and encoded in a GltfAccessor as "MAT2".

Float3 = 5

Object model type "float3". Represented in the glTF JSON as an array of three numbers, and encoded in a GltfAccessor as "VEC3".

Float3X3 = 8

Object model type "float3x3". Represented in the glTF JSON as an array of nine numbers, and encoded in a GltfAccessor as "MAT3".

Float4 = 6

Object model type "float4". Represented in the glTF JSON as an array of four numbers, and encoded in a GltfAccessor as "VEC4".

Float4X4 = 9

Object model type "float4x4". Represented in the glTF JSON as an array of sixteen numbers, and encoded in a GltfAccessor as "MAT4".

FloatArray = 3

Object model type "floatGltfAccessor as "SCALAR".

Int = 10

Object model type "int". Represented in the glTF JSON as a number, and encoded in a GltfAccessor as "SCALAR". The range of values is limited to signed integers. For KHR_interactivity, only 32-bit integers are supported.

Unknown = 0

Unknown or not set object model type. If the object model type is set to this value, the real type still needs to be determined.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.