ObjectPrivate

Sansar.Simulation.ObjectPrivate

ObjectPrivate Class

Interface to an object in a Sansar.Simulation.Cluster in the Scene.

Syntax

[Sansar.Script.Interface]
public class ObjectPrivate : Sansar.Script.InstanceInterface

Remarks

Provides basic information about an object.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
 
ForwardVector Sansar.Vector . The forward vector of the ObjectPrivate in the world frame.
[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
 
ObjectId Sansar.Script.ObjectId . This ObjectPrivate Id. Unique to this Scene.
[read-only]
 
Position Sansar.Vector . The position of the ObjectPrivate in world frame.

Public Methods

  GetComponent (ComponentType, uint) : object
Get interfaces to the components that are available at runtime.
  GetComponentCount (ComponentType) : uint
Get the number of components of a particular component type. Sansar.Simulation.ComponentType
  LookupScripts () : object[]
Get handles to the scripts on the ObjectPrivate
override
ToString () : string
A string representation of this object.
  TryGetComponent<ComponentClass> (uint, out ComponentClass) : bool
Try to get a component of a particular type from this ObjectPrivate
  TryGetFirstComponent<ComponentClass> (out ComponentClass) : bool
Try to get the first component of a specific type on this ObjectPrivate

Member Details

ForwardVector Property

The forward vector of the ObjectPrivate in the world frame.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Vector ForwardVector { get; }

Value

A normalized vector.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetComponent Method

Get interfaces to the components that are available at runtime.

Syntax

[Sansar.Script.Interface]
public object GetComponent (ComponentType componentType, uint index)

Parameters

componentType
Sansar.Simulation.ComponentType.
index
uint32 index

Returns

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetComponentCount Method

Get the number of components of a particular component type. Sansar.Simulation.ComponentType

Syntax

[Sansar.Script.Interface]
public uint GetComponentCount (ComponentType componentType)

Parameters

componentType
Sansar.Simulation.ComponentType

Returns

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

LookupScripts Method

Get handles to the scripts on the ObjectPrivate

Syntax

[Sansar.Script.Interface]
public object[] LookupScripts ()

Returns

object[] of Objects of the scripts on the ObjectPrivate

Remarks

The returned Objects are the created script types. For example if a script on the object is public MyTestObject : ObjectScript then the Objects in the array will be of type MyTestObject.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ObjectId Property

This ObjectPrivate Id. Unique to this Scene.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Script.ObjectId ObjectId { get; }

Value

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Position Property

The position of the ObjectPrivate in world frame.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Vector Position { get; }

Value

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

TryGetComponent<ComponentClass> Generic Method

Try to get a component of a particular type from this ObjectPrivate

Syntax

[Sansar.Script.Interface]
public bool TryGetComponent<ComponentClass> (uint index, out ComponentClass component)
where ComponentClass : class

Type Parameters

ComponentClass
The component type. Sansar.Simulation.AnimationComponentSansar.Simulation.RigidBodyComponent

Parameters

index
The index of this component type to get. zero based index.
component
The component out parameter of the correct type to get.

Returns

True if a component of the correct type at index is found, false otherwise.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

TryGetFirstComponent<ComponentClass> Generic Method

Try to get the first component of a specific type on this ObjectPrivate

Syntax

[Sansar.Script.Interface]
public bool TryGetFirstComponent<ComponentClass> (out ComponentClass component)
where ComponentClass : class

Type Parameters

ComponentClass
The component type. Sansar.Simulation.AnimationComponent and Sansar.Simulation.RigidBodyComponent

Parameters

component
Out parameter of the correct component type.

Returns

Returns true if able to get a component of the correct type on this ObjectPrivate.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.