Duality Namespace

Duality Documentation
Duality Namespace
Classes
 | Class | Description
Public class | CollectDrawcallEventArgs |
Public class | CollisionData | Provides detailed information about a collision event.
Public class | CollisionEventArgs |
Public class | Component | Components are isolated logic units that can independently be added to and removed from GameObjects. Each Component has a distinct purpose, thus it is not possible to add multiple Components of the same Type to one GameObject. Also, a Component may not belong to multiple GameObjects at once.
Public class | ComponentEventArgs | Provides event arguments for Component-related events.
Public class | ComponentTypeComparer |
Public class | ContentProvider | The ContentProvider is Duality's main instance for content management. If you need any kind of Resource, simply request it from the ContentProvider. It keeps track of which Resources are loaded and valid and prevents Resources from being loaded more than once at a time, thus reducing loading times and redundancy. You can also manually register Resources that have been created at runtime using a string alias of your choice.
Public class | CorePlugin |
Public class | CorePluginEventArgs | Obsolete.
Public class | CorePluginManager | Manages loading, reloading, initialization and disposal of Duality core plugins. Since all assemblies are owned by the .Net runtime that only exposes a very limited degree of control, this class should only be used statically: Disposing it would only get rid of management data, not of the actual plugin assemblies, which would then cause problems. A static instance of this class is available through PluginManager.
Public class | DontSerializeAttribute | Flags a class, struct or field as inappropriate for serialization.
Public class | DontSerializeResourceAttribute | Indicates that a field will be assumed null when serializing it as part of a Resource serialization.
Public class | DualityApp | This class controls Duality's main program flow control and general maintenance functionality. It initializes the engine, loads plugins, provides access to user input, houses global data structures and handles logfiles internally.
Public class | DualityAppData | Provides general information about this Duality application / game.
Public class | DualityPlugin |
Public class | DualityPluginEventArgs | Provides event arguments related to CorePlugin instances.
Public class | DualityUserData | Provides information about user settings for this Duality application / game. It is persistent beyond installing or deleting this Duality game.
Public class | ExplicitResourceReferenceAttribute | Allows to explicitly specify what kinds of Resources a certain Resource Type is able to reference. This is an optional attribute that is used for certain runtime optimizations.
Public class | ExtMethodsAlignment |
Public class | ExtMethodsIEnumerable | Provides extension methods for enumerations.
Public class | ExtMethodsIList | Provides extension methods for lists.
Public class | ExtMethodsIManageableObject |
Public class | ExtMethodsInitState |
Public class | ExtMethodsMemberInfo |
Public class | ExtMethodsPropertyInfo |
Public class | ExtMethodsRandom | Provides extension methods for random number generators.
Public class | ExtMethodsString | Provides extension methods for strings.
Public class | ExtMethodsTypeInfo |
Public class | ExtMethodsVisualLogEntry |
Public class | ExtMethodsXml |
Public class | GameObject | GameObjects are what every Scene consists of. They represent nodes in the hierarchial scene graph and can maintain a PrefabLink connection. A GameObject's main duty is to group several Components to form one logical instance of an actual object as part of the game, such as "Car" or "PlayerCharacter". However, the GameObjects itsself does not contain any game-related logic and, by default, doesn't even occupy a position in space. This is the job of its Components.
Public class | GameObjectEventArgs | Provides event arguments for GameObject-related events.
Public class | GameObjectManager | Manages a set of GameObject and exposes suitable object enumerations as well as un/registeration events. If a registered object has been disposed, it will be automatically unregistered.
Public class | GameObjectParentChangedEventArgs | Provides event arguments for a GameObjects "Parent changed" events.
Public class | GenericOperator | Provides math operations for generic types that are dynamically resolved on their first usage.
Public class | GridT | Represents two-dimensional grid-aligned data.
Public class | InMemoryLogOutput | A Log output that stores all log entries in memory.
Public class | Log | Listens for log entries and writes them to registered ILogOutputs.
Public class | LogSharedState | Holds a Logs state values.
Public class | MathF | Provides math utility methods and float versions of Math to fit Duality Single arithmetics.
Public class | ObjectCreator |
Public class | PhysicsUnit |
Public class | PluginManagerT |
Public class | Profile | This class houses several performance counters and performance measurement utility
Public class | ProfileCounter |
Public class | RawListT | Encapsulates an Array and provides methods for dynamically modifying it similar to a List{T}, but allows accessing its raw internal data at the same time. This can be useful for situations wherer raw data access may significantly improve performance, but dynamic sizes are still required.
Public class | ReflectionHelper | Provides reflection-related helper methods.
Public class | ReflectionInfo | Provides Reflection data on Properties and Fields.
 | RequiredComponentAttribute | This attribute indicates a Components requirement for another Component of a specific Type, that is attached to the same GameObject.
Public class | ResolveMemberEventArgs |
Public class | Resource | The abstract Resource class is inherited by any kind of Duality content. Instances of it or one of its subclasses are usually handled wrapped inside a ContentRefT and requested from the ContentProvider.
Public class | ResourceEventArgs |
Public class | ResourceResolveEventArgs |
Public class | ResourceSaveEventArgs |
Public class | StatCounter |
Public class | TextWriterLogOutput | A Log output that uses a TextWriter as message destination.
Public class | Time | The Time class provides a global interface for time measurement and control. It affects all time-dependent computations. Use the TimeMult Property to make your own computations time-dependent instead of frame-dependent. Otherwise, your game logic will depend on how many FPS the player's machine achieves and mit behave differently on very slow or fast machines.
Public class | TimeCounter |
Public class | TransformChangedEventArgs |
Public class | VisualLog | A VisualLog provides functionality to log spatial and other visual information conveniently, which is displayed in real-time. Each VisualLog can be set up differently and corresponds to a distinct visual layer. All submitted calls are guaranteed to be displayed visually within the same frame they were submitted in.
Public class | VisualLogCircleEntry | Represents a circular area in space in the context of visual logging.
Public class | VisualLogConnectionEntry | Represents a connection between two points in space in the context of visual logging.
Public class | VisualLogEntry | Represents an entry of a VisualLog, which will be generated by calling one of the available drawing methods on one of the available logs.
Public class | VisualLogPointEntry | Represents a point in space in the context of visual logging. Points do not have a physical size and thus are displayed invariantly to parent or perspective scale.
Public class | VisualLogPolygonEntry | Represents a polygon in the context of visual logging.
Public class | VisualLogTextEntry | Represents a textual description of a certain point in space in the context of visual logging.
Public class | VisualLogVectorEntry | Represents a vector based on a certain space origin in the context of visual logging.
Structures
 | Structure | Description
Public structure | ContentRefT | This lightweight struct references Resources in an abstract way. It is tightly connected to the ContentProvider and takes care of keeping or making the referenced content available when needed. Never store actual Resource references permanently, instead use a ContentRef to it. However, you may retrieve and store a direct Resource reference temporarily, although this is only recommended at method-local scope.
Public structure | LogEntry | A log entry.
Public structure | Matrix3 | Represents a 3x3 matrix containing 3D rotation and scale.
Public structure | Matrix4 | Represents a 4x4 matrix containing 3D rotation, scale, transform, and projection.
Public structure | Point2 | Represents a 2D point using two integer values. For vector math, see Vector2.
Public structure | ProfileReportCounterData |
Public structure | Quaternion | Represents a Quaternion.
Public structure | Range | Represents a range of values between a specific minimum and maximum value.
Public structure | Rect | Describes a rectangular area.
Public structure | Vector2 | Represents a 2D vector using two single-precision floating-point numbers.
Public structure | Vector3 | Represents a 3D vector using three single-precision floating-point numbers.
Public structure | Vector4 | Represents a 4D vector using four single-precision floating-point numbers.
Interfaces
 | Interface | Description
Public interface | ICmpCollisionListener | Implement this interface in Components that require notification of collision events that occur to the GameObject they belong to.
Public interface | ICmpEditorUpdatable | Implement this interface in Components that require per-frame updates in the editor.
Public interface | ICmpInitializable | Implement this interface in Components that require specific init and shutdown logic.
Public interface | ICmpRenderer | Implement this interface in Components that are considered renderable.
Public interface | ICmpUpdatable | Implement this interface in Components that require per-frame updates.
Public interface | IContentRef | IContentRef is a general interface for content references of any Resource type.
Public interface | ILogOutput | Represents a single Log output and provides actual writing functionality for
Public interface | IManageableObject | Represents an object that can be de/activated and explicitly released / disposed
Public interface | IReadOnlyGridT | Represents a readonly interface for two-dimensional grid-aligned data.
Enumerations
 | Enumeration | Description
Public enumeration | AAQuality | Specifies the quality level of the anti-aliasing used for rendering.
Public enumeration | Alignment | Represents a 2D spatial alignment.
Public enumeration | ComponentInitContext | Describes the kind of initialization that can be performed on a Component
Public enumeration | ComponentShutdownContext | Describes the kind of shutdown that can be performed on a Component
Public enumeration | DualityAppExecutionContext | Describes the context in which the current DualityApp runs.
Public enumeration | DualityAppExecutionEnvironment | Describes the environment in which the current DualityApp runs.
Public enumeration | GamepadButton |
Public enumeration | GridTShrinkMode | Specifies flags on how to shrink a grid to its minimal size.
Public enumeration | InitState | Describes the state of object activation or disposal.
Public enumeration | LogMessageType | The type of a log message / entry.
Public enumeration | ProfileReportOptions |
Public enumeration | RefreshMode | Specifies intervals and modes to refresh the screen and update the game.
Public enumeration | ScreenMode | Describes the way a Duality window is set up.
Public enumeration | VisualLogAnchor | Describes the reference point by which a VisualLogEntry will be transformed.


AAQuality Enumeration

AAQuality Enumeration
Specifies the quality level of the anti-aliasing used for rendering.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum AAQuality
Members
Member name | Value | Description
High | 0 | Highest possible quality. Sacrifices performance for smooth edges. Can be a problem on older machines.
Medium | 1 | Medium quality. A tradeoff between looks and Profile.
Low | 2 | Low quality. Favors Profile.
Off | 3 | No hardware anti-aliasing is used at all.
See Also

Reference

Duality Namespace


Alignment Enumeration

Alignment Enumeration
Represents a 2D spatial alignment.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public enum Alignment
Members
Member name | Value | Description
Center | 0 | Align to its center.
Left | 1 | Align to its left.
Right | 2 | Align to its right.
Top | 4 | Align to its top.
Bottom | 8 | Align to its bottom.
TopLeft | 5 | Align to its top left.
TopRight | 6 | Align to its top right.
BottomLeft | 9 | Align to its bottom left.
BottomRight | 10 | Align to its bottom right.
See Also

Reference

Duality Namespace


CollectDrawcallEventArgs Class

CollectDrawcallEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityCollectDrawcallEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CollectDrawcallEventArgs : EventArgs

The CollectDrawcallEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | CollectDrawcallEventArgs | Initializes a new instance of the CollectDrawcallEventArgs class
Top
Properties
 | Name | Description
Public property | Device |
Top
See Also

Reference

Duality Namespace


CollectDrawcallEventArgs Constructor

CollectDrawcallEventArgs Constructor
Initializes a new instance of the CollectDrawcallEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollectDrawcallEventArgs(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice
See Also

Reference

CollectDrawcallEventArgs Class
Duality Namespace


CollectDrawcallEventArgs Properties

CollectDrawcallEventArgs Properties

The CollectDrawcallEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Device |
Top
See Also

Reference

CollectDrawcallEventArgs Class
Duality Namespace


CollectDrawcallEventArgs.Device Property

CollectDrawcallEventArgsDevice Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IDrawDevice Device { get; }

Property Value

Type: IDrawDevice
See Also

Reference

CollectDrawcallEventArgs Class
Duality Namespace


CollisionData Class

CollisionData Class
Provides detailed information about a collision event.
Inheritance Hierarchy
SystemObject
DualityCollisionData

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CollisionData

The CollisionData type exposes the following members.

Constructors
 | Name | Description
Public method | CollisionData | Initializes a new instance of the CollisionData class
Top
Properties
 | Name | Description
Public property | Normal | [GET] The normal vector of the collision impulse, in the global coordinate system.
Public property | NormalImpulse | [GET] The impulse that is delivered along the provided normal vector.
Public property | NormalMass | [GET] The mass that is interacting along the provided normal vector.
Public property | NormalSpeed | [GET] The speed change that will occur when applying NormalImpulse to NormalMass.
Public property | Pos | [GET] The position at which the collision occurred in absolute world coordinates.
Public property | Tangent | [GET] The tangent vector of the collision impulse, in the global coordinate system.
Public property | TangentImpulse | [GET] The impulse that is delivered along the provided tangent vector.
Public property | TangentMass | [GET] The mass that is interacting along the provided tangent vector.
Public property | TangentSpeed | [GET] The speed change that will occur when applying TangentImpulse to TangentMass.
Top
See Also

Reference

Duality Namespace


CollisionData Constructor

CollisionData Constructor
Initializes a new instance of the CollisionData class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionData(
    Vector2 pos,
    Vector2 normal,
    float normalImpulse,
    float tangentImpulse,
    float normalMass,
    float tangentMass
)

Parameters

pos
Type: DualityVector2
normal
Type: DualityVector2
normalImpulse
Type: SystemSingle
tangentImpulse
Type: SystemSingle
normalMass
Type: SystemSingle
tangentMass
Type: SystemSingle
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData Properties

CollisionData Properties

The CollisionData type exposes the following members.

Properties
 | Name | Description
Public property | Normal | [GET] The normal vector of the collision impulse, in the global coordinate system.
Public property | NormalImpulse | [GET] The impulse that is delivered along the provided normal vector.
Public property | NormalMass | [GET] The mass that is interacting along the provided normal vector.
Public property | NormalSpeed | [GET] The speed change that will occur when applying NormalImpulse to NormalMass.
Public property | Pos | [GET] The position at which the collision occurred in absolute world coordinates.
Public property | Tangent | [GET] The tangent vector of the collision impulse, in the global coordinate system.
Public property | TangentImpulse | [GET] The impulse that is delivered along the provided tangent vector.
Public property | TangentMass | [GET] The mass that is interacting along the provided tangent vector.
Public property | TangentSpeed | [GET] The speed change that will occur when applying TangentImpulse to TangentMass.
Top
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.Normal Property

CollisionDataNormal Property
[GET] The normal vector of the collision impulse, in the global coordinate system.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Normal { get; }

Property Value

Type: Vector2
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.NormalImpulse Property

CollisionDataNormalImpulse Property
[GET] The impulse that is delivered along the provided normal vector.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float NormalImpulse { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.NormalMass Property

CollisionDataNormalMass Property
[GET] The mass that is interacting along the provided normal vector.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float NormalMass { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.NormalSpeed Property

CollisionDataNormalSpeed Property
[GET] The speed change that will occur when applying NormalImpulse to NormalMass.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float NormalSpeed { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.Pos Property

CollisionDataPos Property
[GET] The position at which the collision occurred in absolute world coordinates.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Pos { get; }

Property Value

Type: Vector2
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.Tangent Property

CollisionDataTangent Property
[GET] The tangent vector of the collision impulse, in the global coordinate system.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Tangent { get; }

Property Value

Type: Vector2
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.TangentImpulse Property

CollisionDataTangentImpulse Property
[GET] The impulse that is delivered along the provided tangent vector.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TangentImpulse { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.TangentMass Property

CollisionDataTangentMass Property
[GET] The mass that is interacting along the provided tangent vector.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TangentMass { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionData.TangentSpeed Property

CollisionDataTangentSpeed Property
[GET] The speed change that will occur when applying TangentImpulse to TangentMass.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TangentSpeed { get; }

Property Value

Type: Single
See Also

Reference

CollisionData Class
Duality Namespace


CollisionEventArgs Class

CollisionEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityCollisionEventArgs
Duality.Components.PhysicsRigidBodyCollisionEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CollisionEventArgs : EventArgs

The CollisionEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | CollisionEventArgs | Initializes a new instance of the CollisionEventArgs class
Top
Properties
 | Name | Description
Public property | CollideWith |
Public property | CollisionData |
Top
See Also

Reference

Duality Namespace


CollisionEventArgs Constructor

CollisionEventArgs Constructor
Initializes a new instance of the CollisionEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionEventArgs(
    GameObject obj,
    CollisionData data
)

Parameters

obj
Type: DualityGameObject
data
Type: DualityCollisionData
See Also

Reference

CollisionEventArgs Class
Duality Namespace


CollisionEventArgs Properties

CollisionEventArgs Properties

The CollisionEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | CollideWith |
Public property | CollisionData |
Top
See Also

Reference

CollisionEventArgs Class
Duality Namespace


CollisionEventArgs.CollideWith Property

CollisionEventArgsCollideWith Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject CollideWith { get; }

Property Value

Type: GameObject
See Also

Reference

CollisionEventArgs Class
Duality Namespace


CollisionEventArgs.CollisionData Property

CollisionEventArgsCollisionData Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionData CollisionData { get; }

Property Value

Type: CollisionData
See Also

Reference

CollisionEventArgs Class
Duality Namespace


Component Class

Component Class
Components are isolated logic units that can independently be added to and removed from GameObjects. Each Component has a distinct purpose, thus it is not possible to add multiple Components of the same Type to one GameObject. Also, a Component may not belong to multiple GameObjects at once.
Inheritance Hierarchy
SystemObject
DualityComponent
More...

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class Component : IManageableObject,
    IUniqueIdentifyable, ICloneExplicit

The Component type exposes the following members.

Constructors
 | Name | Description
Protected method | Component | Initializes a new instance of the Component class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component.
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail.
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead.
Public method | GetRequiredComponents | Returns all Component Types this Component requires.
 | GetRequiredComponents(Type) | Returns all required Component Types of a specified Component Type.
 | GetRequiringComponents | Returns the number of Component Types that require the specified Component Type. This can be used as a measure of relative Component significance.
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met.
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type.
 | RequiresComponent(Type, Type) | Returns whether a Component Type requires another Component Type to work properly.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active.
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs.
Top
See Also

Reference

Duality Namespace
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsCamera
Duality.Components.DiagnosticsProfileRenderer
Duality.Components.DiagnosticsVisualLogRenderer
Duality.Components.PhysicsRigidBody
Duality.ComponentsRenderer
Duality.ComponentsSoundEmitter
Duality.ComponentsSoundListener
Duality.ComponentsTransform


Component Constructor

Component Constructor
Initializes a new instance of the Component class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Component()
See Also

Reference

Component Class
Duality Namespace


Component Methods

Component Methods

The Component type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component.
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail.
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead.
Public method | GetRequiredComponents | Returns all Component Types this Component requires.
 | GetRequiredComponents(Type) | Returns all required Component Types of a specified Component Type.
 | GetRequiringComponents | Returns the number of Component Types that require the specified Component Type. This can be used as a measure of relative Component significance.
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met.
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type.
 | RequiresComponent(Type, Type) | Returns whether a Component Type requires another Component Type to work properly.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
See Also

Reference

Component Class
Duality Namespace


Component.Clone Method

ComponentClone Method
Creates a deep copy of this Component.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component Clone()

Return Value

Type: Component
A reference to a newly created deep copy of this Component.
See Also

Reference

Component Class
Duality Namespace


Component.CopyTo Method

ComponentCopyTo Method
Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    Component target
)

Parameters

target
Type: DualityComponent
The target Component to copy to.
See Also

Reference

Component Class
Duality Namespace


Component.Dispose Method

ComponentDispose Method
Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IManageableObjectDispose
See Also

Reference

Component Class
Duality Namespace
ExtMethodsIManageableObjectDisposeLater(IManageableObject)


Component.GetRequiredComponents Method

ComponentGetRequiredComponents Method
Overload List
 | Name | Description
Public method | GetRequiredComponents | Returns all Component Types this Component requires.
 | GetRequiredComponents(Type) | Returns all required Component Types of a specified Component Type.
Top
See Also

Reference

Component Class
Duality Namespace


Component.GetRequiredComponents Method

ComponentGetRequiredComponents Method
Returns all Component Types this Component requires.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Type> GetRequiredComponents()

Return Value

Type: IEnumerable Type
An array of required Component Types.
See Also

Reference

Component Class
GetRequiredComponents Overload
Duality Namespace


Component.GetRequiredComponents Method (Type)

ComponentGetRequiredComponents Method (Type)
Returns all required Component Types of a specified Component Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Type> GetRequiredComponents(
    Type cmpType
)

Parameters

cmpType
Type: SystemType
The Component Type that might require other Component Types.

Return Value

Type: IEnumerable Type
An array of Component Types to require.
See Also

Reference

Component Class
GetRequiredComponents Overload
Duality Namespace


Component.GetRequiringComponents Method

ComponentGetRequiringComponents Method
Returns the number of Component Types that require the specified Component Type. This can be used as a measure of relative Component significance.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Type> GetRequiringComponents(
    Type requiredType
)

Parameters

requiredType
Type: SystemType

Return Value

Type: IEnumerable Type
See Also

Reference

Component Class
Duality Namespace


Component.IsComponentRequirementMet Method

ComponentIsComponentRequirementMet Method
Overload List
 | Name | Description
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met.
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject
Top
See Also

Reference

Component Class
Duality Namespace


Component.IsComponentRequirementMet Method (Component)

ComponentIsComponentRequirementMet Method (Component)
Returns whether this objects Component requirement is met.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsComponentRequirementMet(
    Component evenWhenRemovingThis = null
)

Parameters

evenWhenRemovingThis (Optional)
Type: DualityComponent
If not null, the specified Component is assumed to be missing.

Return Value

Type: Boolean
True, if the Component requirement is met, false if not.
See Also

Reference

Component Class
IsComponentRequirementMet Overload
Duality Namespace


Component.IsComponentRequirementMet Method (GameObject, IEnumerable(Component))

ComponentIsComponentRequirementMet Method (GameObject, IEnumerableComponent)
Returns whether this objects Component requirement is met assuming a different parent GameObject

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsComponentRequirementMet(
    GameObject isMetInObj,
    IEnumerable<Component> whenAddingThose = null
)

Parameters

isMetInObj
Type: DualityGameObject
The specified object is assumed as parent object.
whenAddingThose (Optional)
Type: System.Collections.GenericIEnumerable Component
If not null, the specified Components are assumed to be present in the specified parent object.

Return Value

Type: Boolean
True, if the Component requirement is met, false if not.
See Also

Reference

Component Class
IsComponentRequirementMet Overload
Duality Namespace


Component.OnCopyDataTo Method

ComponentOnCopyDataTo Method
This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
The target Component where this Components data is copied to.
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Component Class
Duality Namespace


Component.OnSetupCloneTargets Method

ComponentOnSetupCloneTargets Method
This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnSetupCloneTargets(
    Object target,
    ICloneTargetSetup setup
)

Parameters

target
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

Component Class
Duality Namespace


Component.RequiresComponent Method

ComponentRequiresComponent Method
Overload List
 | Name | Description
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type.
 | RequiresComponent(Type, Type) | Returns whether a Component Type requires another Component Type to work properly.
Top
See Also

Reference

Component Class
Duality Namespace


Component.RequiresComponent Method (Type)

ComponentRequiresComponent Method (Type)
Returns whether this Component requires a Component of the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RequiresComponent(
    Type requiredType
)

Parameters

requiredType
Type: SystemType
The Component Type that might be required.

Return Value

Type: Boolean
True, if there is a requirement, false if not
See Also

Reference

Component Class
RequiresComponent Overload
Duality Namespace


Component.RequiresComponent Method (Type, Type)

ComponentRequiresComponent Method (Type, Type)
Returns whether a Component Type requires another Component Type to work properly.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool RequiresComponent(
    Type cmpType,
    Type requiredType
)

Parameters

cmpType
Type: SystemType
The Component Type that might require another Component Type.
requiredType
Type: SystemType
The Component Type that might be required.

Return Value

Type: Boolean
True, if there is a requirement, false if not
See Also

Reference

Component Class
RequiresComponent Overload
Duality Namespace


Component.ToString Method

ComponentToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Component Class
Duality Namespace


Component Properties

Component Properties

The Component type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active.
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs.
Top
See Also

Reference

Component Class
Duality Namespace


Component.Active Property

ComponentActive Property
[GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Active { get; set; }

Property Value

Type: Boolean

Implements

IManageableObjectActive
See Also

Reference

Component Class
Duality Namespace
ComponentActiveSingle


Component.ActiveSingle Property

ComponentActiveSingle Property
[GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ActiveSingle { get; set; }

Property Value

Type: Boolean
See Also

Reference

Component Class
Duality Namespace
ComponentActive


Component.Disposed Property

ComponentDisposed Property
[GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean

Implements

IManageableObjectDisposed
See Also

Reference

Component Class
Duality Namespace


Component.GameObj Property

ComponentGameObj Property
[GET / SET] The GameObject to which this Component belongs.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject GameObj { get; set; }

Property Value

Type: GameObject
See Also

Reference

Component Class
Duality Namespace


Component.InitContext Enumeration

ComponentInitContext Enumeration
Describes the kind of initialization that can be performed on a Component

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum InitContext
Members
Member name | Value | Description
Saved | 0 | A saving process has just finished.
Loaded | 1 | The Component has been fully loaded.
Activate | 2 | The Component is being activated. This can be the result of activating it, activating its GameObject, adding itsself or its GameObject to the current Scene or entering a Scene in which this Component is registered.
AddToGameObject | 3 | The Component has just been added to a GameObject
See Also

Reference

Duality Namespace


Component.ShutdownContext Enumeration

ComponentShutdownContext Enumeration
Describes the kind of shutdown that can be performed on a Component

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ShutdownContext
Members
Member name | Value | Description
Saving | 0 | A saving process is about to start
Deactivate | 1 | The Component has been deactivated. This can be the result of deactivating it, deactivating its GameObject, removing itsself or its GameObject from the current Scene or leaving a Scene in which this Component is registered.
RemovingFromGameObject | 2 | The Component is being removed from its GameObject.
See Also

Reference

Duality Namespace


ComponentEventArgs Class

ComponentEventArgs Class
Provides event arguments for Component-related events.
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityComponentEventArgs
DualityTransformChangedEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ComponentEventArgs : EventArgs

The ComponentEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | ComponentEventArgs | Initializes a new instance of the ComponentEventArgs class
Top
Properties
 | Name | Description
Public property | Component | [GET] The affected Component.
Top
See Also

Reference

Duality Namespace


ComponentEventArgs Constructor

ComponentEventArgs Constructor
Initializes a new instance of the ComponentEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ComponentEventArgs(
    Component cmp
)

Parameters

cmp
Type: DualityComponent
See Also

Reference

ComponentEventArgs Class
Duality Namespace


ComponentEventArgs Properties

ComponentEventArgs Properties

The ComponentEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Component | [GET] The affected Component.
Top
See Also

Reference

ComponentEventArgs Class
Duality Namespace


ComponentEventArgs.Component Property

ComponentEventArgsComponent Property
[GET] The affected Component.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component Component { get; }

Property Value

Type: Component
See Also

Reference

ComponentEventArgs Class
Duality Namespace


ComponentTypeComparer Class

ComponentTypeComparer Class
Inheritance Hierarchy
SystemObject
DualityComponentTypeComparer

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ComponentTypeComparer : IEqualityComparer<Component>

The ComponentTypeComparer type exposes the following members.

Constructors
 | Name | Description
Public method | ComponentTypeComparer | Initializes a new instance of the ComponentTypeComparer class
Top
Methods
 | Name | Description
Public method | Equals |
Public method | GetHashCode |
Top
Fields
Name | Description
Default |
Top
See Also

Reference

Duality Namespace


ComponentTypeComparer Constructor

ComponentTypeComparer Constructor
Initializes a new instance of the ComponentTypeComparer class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ComponentTypeComparer()
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ComponentTypeComparer Fields

ComponentTypeComparer Fields

The ComponentTypeComparer type exposes the following members.

Fields
Name | Description
Default |
Top
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ComponentTypeComparer.Default Field

ComponentTypeComparerDefault Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly ComponentTypeComparer Default

Field Value

Type: ComponentTypeComparer
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ComponentTypeComparer Methods

ComponentTypeComparer Methods

The ComponentTypeComparer type exposes the following members.

Methods
 | Name | Description
Public method | Equals |
Public method | GetHashCode |
Top
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ComponentTypeComparer.Equals Method

ComponentTypeComparerEquals Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Equals(
    Component x,
    Component y
)

Parameters

x
Type: DualityComponent
y
Type: DualityComponent

Return Value

Type: Boolean

Implements

IEqualityComparerTEquals(T, T)
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ComponentTypeComparer.GetHashCode Method

ComponentTypeComparerGetHashCode Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetHashCode(
    Component obj
)

Parameters

obj
Type: DualityComponent

Return Value

Type: Int32

Implements

IEqualityComparerTGetHashCode(T)
See Also

Reference

ComponentTypeComparer Class
Duality Namespace


ContentProvider Class

ContentProvider Class

The ContentProvider is Duality's main instance for content management. If you need any kind of Resource, simply request it from the ContentProvider. It keeps track of which Resources are loaded and valid and prevents Resources from being loaded more than once at a time, thus reducing loading times and redundancy.

You can also manually register Resources that have been created at runtime using a string alias of your choice.

Inheritance Hierarchy
SystemObject
DualityContentProvider

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ContentProvider

The ContentProvider type exposes the following members.

Methods
Name | Description
AddContent | Registers a Resource and maps it to the specified path key.
ClearContent | Clears all non-default content.
DisposeDefaultContent | Initializes Dualitys embedded default content.
GetAvailableContent(Type, String) | Returns a list of all available / existing content matching the specified Type
GetAvailableContentT(String) | Returns a list of all available / existing content matching the specified Type
GetDefaultContent(Type) | Returns a list of embedded default content that matches the specified type.
GetDefaultContentT | Returns a list of embedded default content that matches the specified type.
GetFullNameFromPath | Determines the full (hierarchical) name of a Resource based on its path.
GetLoadedContent(Type) | Returns a list of all currently loaded content matching the specified Type
GetLoadedContentT | Returns a list of all currently loaded content matching the specified Type
GetNameFromPath | Determines the name of a Resource based on its path.
HasContent | Returns whether or not there is any content currently registered under the specified path key.
InitDefaultContent | Initializes Dualitys embedded default content.
IsDefaultContentPath | Returns whether or not the specified path points to Duality default content.
RemoveAllContent(Type, Boolean) | Unregisters all content of the specified Type or subclassed Types.
RemoveAllContentT(Boolean) | Unregisters all content of the specified Type or subclassed Types.
RemoveContent(String, Boolean) | Unregisters content that has been registered using the specified path key.
RemoveContent(Resource, Boolean) | Explicitly removes a specific Resource from the ContentProvider.
RemoveContentTree | Unregisters all content that has been registered using paths contained within the specified directory.
RenameContent | Changes the path key under which a specific Resource can be found. If the target path is registered already, it will be replaced. If the source path isn't registered / is unknown, the operation will fail.
RenameContentTree | Changes the path key under which a set of Resource can be found, i.e. renames all path keys located inside the specified directory.
RequestContent(String) | Requests a Resource.
RequestContentT(String) | Requests a Resource.
Top
Fields
Name | Description
VirtualContentPath | (Virtual) base path for Duality's embedded default content.
Top
Events
Name | Description
ResourceResolve |
Top
See Also

Reference

Duality Namespace
DualityResource
DualityContentRefT
DualityIContentRef


ContentProvider Fields

ContentProvider Fields

The ContentProvider type exposes the following members.

Fields
Name | Description
VirtualContentPath | (Virtual) base path for Duality's embedded default content.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.VirtualContentPath Field

ContentProviderVirtualContentPath Field
(Virtual) base path for Duality's embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string VirtualContentPath

Field Value

Type: String
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider Methods

ContentProvider Methods

The ContentProvider type exposes the following members.

Methods
Name | Description
AddContent | Registers a Resource and maps it to the specified path key.
ClearContent | Clears all non-default content.
DisposeDefaultContent | Initializes Dualitys embedded default content.
GetAvailableContent(Type, String) | Returns a list of all available / existing content matching the specified Type
GetAvailableContentT(String) | Returns a list of all available / existing content matching the specified Type
GetDefaultContent(Type) | Returns a list of embedded default content that matches the specified type.
GetDefaultContentT | Returns a list of embedded default content that matches the specified type.
GetFullNameFromPath | Determines the full (hierarchical) name of a Resource based on its path.
GetLoadedContent(Type) | Returns a list of all currently loaded content matching the specified Type
GetLoadedContentT | Returns a list of all currently loaded content matching the specified Type
GetNameFromPath | Determines the name of a Resource based on its path.
HasContent | Returns whether or not there is any content currently registered under the specified path key.
InitDefaultContent | Initializes Dualitys embedded default content.
IsDefaultContentPath | Returns whether or not the specified path points to Duality default content.
RemoveAllContent(Type, Boolean) | Unregisters all content of the specified Type or subclassed Types.
RemoveAllContentT(Boolean) | Unregisters all content of the specified Type or subclassed Types.
RemoveContent(String, Boolean) | Unregisters content that has been registered using the specified path key.
RemoveContent(Resource, Boolean) | Explicitly removes a specific Resource from the ContentProvider.
RemoveContentTree | Unregisters all content that has been registered using paths contained within the specified directory.
RenameContent | Changes the path key under which a specific Resource can be found. If the target path is registered already, it will be replaced. If the source path isn't registered / is unknown, the operation will fail.
RenameContentTree | Changes the path key under which a set of Resource can be found, i.e. renames all path keys located inside the specified directory.
RequestContent(String) | Requests a Resource.
RequestContentT(String) | Requests a Resource.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.AddContent Method

ContentProviderAddContent Method
Registers a Resource and maps it to the specified path key.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void AddContent(
    string path,
    Resource content
)

Parameters

path
Type: SystemString
The path key to map the Resource to
content
Type: DualityResource
The Resource to register.
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.ClearContent Method

ContentProviderClearContent Method
Clears all non-default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void ClearContent(
    bool dispose = true
)

Parameters

dispose (Optional)
Type: SystemBoolean
If true, unregistered content is also disposed.
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.DisposeDefaultContent Method

ContentProviderDisposeDefaultContent Method
Initializes Dualitys embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void DisposeDefaultContent()
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.GetAvailableContent Method

ContentProviderGetAvailableContent Method
Overload List
Name | Description
GetAvailableContentT(String) | Returns a list of all available / existing content matching the specified Type
GetAvailableContent(Type, String) | Returns a list of all available / existing content matching the specified Type
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.GetAvailableContent(T) Method (String)

ContentProviderGetAvailableContentT Method (String)
Returns a list of all available / existing content matching the specified Type

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<ContentRef<T>> GetAvailableContent<T>(
    string baseDirectory = null
)
where T : Resource

Parameters

baseDirectory (Optional)
Type: SystemString
The base directory to search in. Defaults to DataDirectory if not specified otherwise.

Type Parameters

T

Return Value

Type: List ContentRef T
See Also

Reference

ContentProvider Class
GetAvailableContent Overload
Duality Namespace


ContentProvider.GetAvailableContent Method (Type, String)

ContentProviderGetAvailableContent Method (Type, String)
Returns a list of all available / existing content matching the specified Type

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<IContentRef> GetAvailableContent(
    Type t,
    string baseDirectory = null
)

Parameters

t
Type: SystemType
baseDirectory (Optional)
Type: SystemString
The base directory to search in. Defaults to DataDirectory if not specified otherwise.

Return Value

Type: List IContentRef
See Also

Reference

ContentProvider Class
GetAvailableContent Overload
Duality Namespace


ContentProvider.GetDefaultContent Method

ContentProviderGetDefaultContent Method
Overload List
Name | Description
GetDefaultContentT | Returns a list of embedded default content that matches the specified type.
GetDefaultContent(Type) | Returns a list of embedded default content that matches the specified type.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.GetDefaultContent(T) Method

ContentProviderGetDefaultContentT Method
Returns a list of embedded default content that matches the specified type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<ContentRef<T>> GetDefaultContent<T>()
where T : Resource

Type Parameters

T

Return Value

Type: List ContentRef T
See Also

Reference

ContentProvider Class
GetDefaultContent Overload
Duality Namespace


ContentProvider.GetDefaultContent Method (Type)

ContentProviderGetDefaultContent Method (Type)
Returns a list of embedded default content that matches the specified type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<IContentRef> GetDefaultContent(
    Type t
)

Parameters

t
Type: SystemType

Return Value

Type: List IContentRef
See Also

Reference

ContentProvider Class
GetDefaultContent Overload
Duality Namespace


ContentProvider.GetFullNameFromPath Method

ContentProviderGetFullNameFromPath Method
Determines the full (hierarchical) name of a Resource based on its path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFullNameFromPath(
    string resPath
)

Parameters

resPath
Type: SystemString

Return Value

Type: String
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.GetLoadedContent Method

ContentProviderGetLoadedContent Method
Overload List
Name | Description
GetLoadedContentT | Returns a list of all currently loaded content matching the specified Type
GetLoadedContent(Type) | Returns a list of all currently loaded content matching the specified Type
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.GetLoadedContent(T) Method

ContentProviderGetLoadedContentT Method
Returns a list of all currently loaded content matching the specified Type

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<ContentRef<T>> GetLoadedContent<T>()
where T : Resource

Type Parameters

T

Return Value

Type: List ContentRef T
See Also

Reference

ContentProvider Class
GetLoadedContent Overload
Duality Namespace


ContentProvider.GetLoadedContent Method (Type)

ContentProviderGetLoadedContent Method (Type)
Returns a list of all currently loaded content matching the specified Type

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<IContentRef> GetLoadedContent(
    Type t
)

Parameters

t
Type: SystemType

Return Value

Type: List IContentRef
See Also

Reference

ContentProvider Class
GetLoadedContent Overload
Duality Namespace


ContentProvider.GetNameFromPath Method

ContentProviderGetNameFromPath Method
Determines the name of a Resource based on its path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetNameFromPath(
    string resPath
)

Parameters

resPath
Type: SystemString

Return Value

Type: String
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.HasContent Method

ContentProviderHasContent Method
Returns whether or not there is any content currently registered under the specified path key.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HasContent(
    string path
)

Parameters

path
Type: SystemString
The path key to look for content

Return Value

Type: Boolean
True, if there is content available for that path key, false if not.
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.InitDefaultContent Method

ContentProviderInitDefaultContent Method
Initializes Dualitys embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void InitDefaultContent()
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.IsDefaultContentPath Method

ContentProviderIsDefaultContentPath Method
Returns whether or not the specified path points to Duality default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsDefaultContentPath(
    string resPath
)

Parameters

resPath
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RemoveAllContent Method

ContentProviderRemoveAllContent Method
Overload List
Name | Description
RemoveAllContentT(Boolean) | Unregisters all content of the specified Type or subclassed Types.
RemoveAllContent(Type, Boolean) | Unregisters all content of the specified Type or subclassed Types.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RemoveAllContent(T) Method (Boolean)

ContentProviderRemoveAllContentT Method (Boolean)
Unregisters all content of the specified Type or subclassed Types.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RemoveAllContent<T>(
    bool dispose = true
)
where T : Resource

Parameters

dispose (Optional)
Type: SystemBoolean
If true, unregistered content is also disposed.

Type Parameters

T
The content Type to look for.
See Also

Reference

ContentProvider Class
RemoveAllContent Overload
Duality Namespace


ContentProvider.RemoveAllContent Method (Type, Boolean)

ContentProviderRemoveAllContent Method (Type, Boolean)
Unregisters all content of the specified Type or subclassed Types.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RemoveAllContent(
    Type t,
    bool dispose = true
)

Parameters

t
Type: SystemType
The content Type to look for.
dispose (Optional)
Type: SystemBoolean
If true, unregistered content is also disposed.
See Also

Reference

ContentProvider Class
RemoveAllContent Overload
Duality Namespace


ContentProvider.RemoveContent Method

ContentProviderRemoveContent Method
Overload List
Name | Description
RemoveContent(String, Boolean) | Unregisters content that has been registered using the specified path key.
RemoveContent(Resource, Boolean) | Explicitly removes a specific Resource from the ContentProvider.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RemoveContent Method (String, Boolean)

ContentProviderRemoveContent Method (String, Boolean)
Unregisters content that has been registered using the specified path key.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool RemoveContent(
    string path,
    bool dispose = true
)

Parameters

path
Type: SystemString
The path key to unregister.
dispose (Optional)
Type: SystemBoolean
If true, unregistered content is also disposed.

Return Value

Type: Boolean
True, if the content has been found and successfully removed. False, if no
See Also

Reference

ContentProvider Class
RemoveContent Overload
Duality Namespace


ContentProvider.RemoveContent Method (Resource, Boolean)

ContentProviderRemoveContent Method (Resource, Boolean)
Explicitly removes a specific Resource from the ContentProvider.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool RemoveContent(
    Resource res,
    bool dispose = true
)

Parameters

res
Type: DualityResource
dispose (Optional)
Type: SystemBoolean

Return Value

Type: Boolean
See Also

Reference

ContentProvider Class
RemoveContent Overload
Duality Namespace


ContentProvider.RemoveContentTree Method

ContentProviderRemoveContentTree Method
Unregisters all content that has been registered using paths contained within the specified directory.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RemoveContentTree(
    string dir,
    bool dispose = true
)

Parameters

dir
Type: SystemString
The directory to unregister
dispose (Optional)
Type: SystemBoolean
If true, unregistered content is also disposed.
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RenameContent Method

ContentProviderRenameContent Method
Changes the path key under which a specific Resource can be found. If the target path is registered already, it will be replaced. If the source path isn't registered / is unknown, the operation will fail.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool RenameContent(
    string path,
    string newPath
)

Parameters

path
Type: SystemString
The Resources current path key.
newPath
Type: SystemString
The Resources new path key.

Return Value

Type: Boolean
True, if the renaming operation was successful. False, if not.
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RenameContentTree Method

ContentProviderRenameContentTree Method
Changes the path key under which a set of Resource can be found, i.e. renames all path keys located inside the specified directory.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RenameContentTree(
    string dir,
    string newDir
)

Parameters

dir
Type: SystemString
The Resources current directory
newDir
Type: SystemString
The Resources new directory
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RequestContent Method

ContentProviderRequestContent Method
Overload List
Name | Description
RequestContentT(String) | Requests a Resource.
RequestContent(String) | Requests a Resource.
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.RequestContent(T) Method (String)

ContentProviderRequestContentT Method (String)
Requests a Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<T> RequestContent<T>(
    string path
)
where T : Resource

Parameters

path
Type: SystemString
The path key to identify the Resource. If there is no matching Resource available yet, the ContentProvider attemps to load a Resource from that path.

Type Parameters

T
The requested Resource type. Does not affect actual data, only the kind of ContentRefT that is obtained.

Return Value

Type: ContentRef T
A ContentRefT to the requested Resource.
See Also

Reference

ContentProvider Class
RequestContent Overload
Duality Namespace


ContentProvider.RequestContent Method (String)

ContentProviderRequestContent Method (String)
Requests a Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IContentRef RequestContent(
    string path
)

Parameters

path
Type: SystemString
The path key to identify the Resource. If there is no matching Resource available yet, the ContentProvider attemps to load a Resource from that path.

Return Value

Type: IContentRef
A IContentRef to the requested Resource.
See Also

Reference

ContentProvider Class
RequestContent Overload
Duality Namespace


ContentProvider Events

ContentProvider Events

The ContentProvider type exposes the following members.

Events
Name | Description
ResourceResolve |
Top
See Also

Reference

ContentProvider Class
Duality Namespace


ContentProvider.ResourceResolve Event

ContentProviderResourceResolve Event

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResourceResolveEventArgs> ResourceResolve

Value

Type: SystemEventHandler ResourceResolveEventArgs
See Also

Reference

ContentProvider Class
Duality Namespace


ContentRef(T) Structure

ContentRefT Structure
This lightweight struct references Resources in an abstract way. It is tightly connected to the ContentProvider and takes care of keeping or making the referenced content available when needed. Never store actual Resource references permanently, instead use a ContentRef to it. However, you may retrieve and store a direct Resource reference temporarily, although this is only recommended at method-local scope.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct ContentRef<T> : IEquatable<ContentRef<T>>,
    IContentRef
where T : Resource

Type Parameters

T

The ContentRefT type exposes the following members.

Constructors
 | Name | Description
Public method | ContentRefT(T) | Creates a ContentRef pointing to the specified Resource.
Public method | ContentRefT(T, String) | Creates a ContentRef pointing to the specified Resource, assuming the specified path as its origin, if the Resource itsself is either null or doesn't provide a valid Path.
Top
Methods
 | Name | Description
Public method | AsU | Creates a ContentRefT of the specified Type, referencing the same Resource.
Public method | Detach | Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ContentRefT) |
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | MakeAvailable | Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef
Public method | ToString | (Overrides ValueTypeToString.)
Top
Operators
Name | Description
Equality | Compares two ContentRefs for equality.
(ContentRefT to T) |
(T to ContentRefT) |
Inequality | Compares two ContentRefs for inequality.
Top
Properties
 | Name | Description
Public property | FullName | [GET] The full name of the referenced Resource, including its path but not its file extension
Public property | IsAvailable | [GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.
Public property | IsDefaultContent | [GET] Returns whether the referenced Resource is part of Duality's embedded default content.
Public property | IsExplicitNull | [GET] Returns whether this content reference has been explicitly set to null.
Public property | IsLoaded | [GET] Returns whether the referenced Resource is currently loaded.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the referenced Resource.
Public property | Path | [GET / SET] The path where to look for the Resource, if it is currently unavailable.
Public property | Res | [GET / SET] The actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.
Public property | ResType | [GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.
Public property | ResWeak | [GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.
Top
See Also

Reference

Duality Namespace
DualityResource
DualityContentProvider
DualityIContentRef


ContentRef(T) Constructor

ContentRefT Constructor
Overload List
 | Name | Description
Public method | ContentRefT(T) | Creates a ContentRef pointing to the specified Resource.
Public method | ContentRefT(T, String) | Creates a ContentRef pointing to the specified Resource, assuming the specified path as its origin, if the Resource itsself is either null or doesn't provide a valid Path.
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T) Constructor (T)

ContentRefT Constructor (T)
Creates a ContentRef pointing to the specified Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef(
    T res
)

Parameters

res
Type: T
The Resource to reference.
See Also

Reference

ContentRefT Structure
ContentRefT Overload
Duality Namespace


ContentRef(T) Constructor (T, String)

ContentRefT Constructor (T, String)
Creates a ContentRef pointing to the specified Resource, assuming the specified path as its origin, if the Resource itsself is either null or doesn't provide a valid Path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef(
    T res,
    string requestPath
)

Parameters

res
Type: T
The Resource to reference.
requestPath
Type: SystemString
See Also

Reference

ContentRefT Structure
ContentRefT Overload
Duality Namespace


ContentRef(T) Methods

ContentRefT Methods

The ContentRefT generic type exposes the following members.

Methods
 | Name | Description
Public method | AsU | Creates a ContentRefT of the specified Type, referencing the same Resource.
Public method | Detach | Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ContentRefT) |
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | MakeAvailable | Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).As(U) Method

ContentRefTAsU Method
Creates a ContentRefT of the specified Type, referencing the same Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<U> As<U>()
where U : Resource

Type Parameters

U
The Resource Type to create a reference of.

Return Value

Type: ContentRef U
A ContentRefT of the specified Type, referencing the same Resource. Returns a null reference if the Resource is not assignable to the specified Type.

Implements

IContentRefAsU
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Detach Method

ContentRefTDetach Method
Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Detach()

Implements

IContentRefDetach
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Equals Method

ContentRefTEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ContentRefT) |
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Equals Method (Object)

ContentRefTEquals Method (Object)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

ContentRefT Structure
Equals Overload
Duality Namespace


ContentRef(T).Equals Method (ContentRef(T))

ContentRefTEquals Method (ContentRefT)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Equals(
    ContentRef<T> other
)

Parameters

other
Type: DualityContentRef T

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

ContentRefT Structure
Equals Overload
Duality Namespace


ContentRef(T).GetHashCode Method

ContentRefTGetHashCode Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Is Method

ContentRefTIs Method
Overload List
 | Name | Description
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Is(U) Method

ContentRefTIsU Method
Determines if the references Resource's Type is assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Is<U>()
where U : Resource

Type Parameters

U
The Resource Type in question.

Return Value

Type: Boolean
True, if the referenced Resource is of the specified Type or subclassing it.

Implements

IContentRefIsU
See Also

Reference

ContentRefT Structure
Is Overload
Duality Namespace


ContentRef(T).Is Method (Type)

ContentRefTIs Method (Type)
Determines if the references Resource's Type is assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Is(
    Type resType
)

Parameters

resType
Type: SystemType
The Resource Type in question.

Return Value

Type: Boolean
True, if the referenced Resource is of the specified Type or subclassing it.

Implements

IContentRefIs(Type)
See Also

Reference

ContentRefT Structure
Is Overload
Duality Namespace


ContentRef(T).MakeAvailable Method

ContentRefTMakeAvailable Method
Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MakeAvailable()

Implements

IContentRefMakeAvailable
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).ToString Method

ContentRefTToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T) Operators and Type Conversions

ContentRefT Operators and Type Conversions

The ContentRefT generic type exposes the following members.

Operators
Name | Description
Equality | Compares two ContentRefs for equality.
(ContentRefT to T) |
(T to ContentRefT) |
Inequality | Compares two ContentRefs for inequality.
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Equality Operator

ContentRefTEquality Operator
Compares two ContentRefs for equality.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator ==(
    ContentRef<T> first,
    ContentRef<T> second
)

Parameters

first
Type: DualityContentRef T
second
Type: DualityContentRef T

Return Value

Type: Boolean
Remarks
This is a two-step comparison. First, their actual Resources references are compared. If they're both not null and equal, true is returned. Otherwise, their Resource paths are compared for equality
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T) Explicit Conversion (ContentRef(T) to T)

ContentRefT Conversion (ContentRefT to T)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static explicit operator T (
    ContentRef<T> res
)

Parameters

res
Type: DualityContentRef T

Return Value

Type: T
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T) Implicit Conversion (T to ContentRef(T))

ContentRefT Conversion (T to ContentRefT)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static implicit operator ContentRef<T> (
    T res
)

Parameters

res
Type: T

Return Value

Type: ContentRef T
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Inequality Operator

ContentRefTInequality Operator
Compares two ContentRefs for inequality.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator !=(
    ContentRef<T> first,
    ContentRef<T> second
)

Parameters

first
Type: DualityContentRef T
second
Type: DualityContentRef T

Return Value

Type: Boolean
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T) Properties

ContentRefT Properties

The ContentRefT generic type exposes the following members.

Properties
 | Name | Description
Public property | FullName | [GET] The full name of the referenced Resource, including its path but not its file extension
Public property | IsAvailable | [GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.
Public property | IsDefaultContent | [GET] Returns whether the referenced Resource is part of Duality's embedded default content.
Public property | IsExplicitNull | [GET] Returns whether this content reference has been explicitly set to null.
Public property | IsLoaded | [GET] Returns whether the referenced Resource is currently loaded.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the referenced Resource.
Public property | Path | [GET / SET] The path where to look for the Resource, if it is currently unavailable.
Public property | Res | [GET / SET] The actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.
Public property | ResType | [GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.
Public property | ResWeak | [GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.
Top
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).FullName Property

ContentRefTFullName Property
[GET] The full name of the referenced Resource, including its path but not its file extension

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FullName { get; }

Property Value

Type: String

Implements

IContentRefFullName
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).IsAvailable Property

ContentRefTIsAvailable Property
[GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAvailable { get; }

Property Value

Type: Boolean

Implements

IContentRefIsAvailable
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).IsDefaultContent Property

ContentRefTIsDefaultContent Property
[GET] Returns whether the referenced Resource is part of Duality's embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsDefaultContent { get; }

Property Value

Type: Boolean

Implements

IContentRefIsDefaultContent
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).IsExplicitNull Property

ContentRefTIsExplicitNull Property
[GET] Returns whether this content reference has been explicitly set to null.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsExplicitNull { get; }

Property Value

Type: Boolean

Implements

IContentRefIsExplicitNull
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).IsLoaded Property

ContentRefTIsLoaded Property
[GET] Returns whether the referenced Resource is currently loaded.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsLoaded { get; }

Property Value

Type: Boolean

Implements

IContentRefIsLoaded
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).IsRuntimeResource Property

ContentRefTIsRuntimeResource Property
[GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsRuntimeResource { get; }

Property Value

Type: Boolean

Implements

IContentRefIsRuntimeResource
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Name Property

ContentRefTName Property
[GET] The name of the referenced Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String

Implements

IContentRefName
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Path Property

ContentRefTPath Property
[GET / SET] The path where to look for the Resource, if it is currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Path { get; set; }

Property Value

Type: String

Implements

IContentRefPath
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).Res Property

ContentRefTRes Property
[GET / SET] The actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T Res { get; set; }

Property Value

Type: T
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).ResType Property

ContentRefTResType Property
[GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type ResType { get; }

Property Value

Type: Type

Implements

IContentRefResType
See Also

Reference

ContentRefT Structure
Duality Namespace


ContentRef(T).ResWeak Property

ContentRefTResWeak Property
[GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T ResWeak { get; }

Property Value

Type: T
See Also

Reference

ContentRefT Structure
Duality Namespace


CorePlugin Class

CorePlugin Class
Inheritance Hierarchy
SystemObject
DualityDualityPlugin
DualityCorePlugin

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class CorePlugin : DualityPlugin

The CorePlugin type exposes the following members.

Constructors
 | Name | Description
Protected method | CorePlugin | Initializes a new instance of the CorePlugin class
Top
Methods
 | Name | Description
Protected method | InitPlugin | Called when initializing the plugin. It is guaranteed that all plugins have been loaded at this point, so this is the ideal place to establish communication with other plugins or load Resources that may rely on them. It is NOT defined whether or not other plugins have been initialized yet.
Protected method | OnAfterUpdate | Called after Duality updates the game scene
Protected method | OnBeforeUpdate | Called before Duality updates the game scene
Protected method | OnDisposePlugin | Called when unloading / disposing the plugin. (Inherited from DualityPlugin.)
Protected method | OnExecContextChanged | Called when Dualitys DualityAppExecutionContext changes.
Top
Properties
 | Name | Description
Public property | AssemblyName | (Inherited from DualityPlugin.)
Public property | Disposed | (Inherited from DualityPlugin.)
Public property | FileHash | (Inherited from DualityPlugin.)
Public property | FilePath | (Inherited from DualityPlugin.)
Public property | PluginAssembly | (Inherited from DualityPlugin.)
Top
See Also

Reference

Duality Namespace


CorePlugin Constructor

CorePlugin Constructor
Initializes a new instance of the CorePlugin class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected CorePlugin()
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin Methods

CorePlugin Methods

The CorePlugin type exposes the following members.

Methods
 | Name | Description
Protected method | InitPlugin | Called when initializing the plugin. It is guaranteed that all plugins have been loaded at this point, so this is the ideal place to establish communication with other plugins or load Resources that may rely on them. It is NOT defined whether or not other plugins have been initialized yet.
Protected method | OnAfterUpdate | Called after Duality updates the game scene
Protected method | OnBeforeUpdate | Called before Duality updates the game scene
Protected method | OnDisposePlugin | Called when unloading / disposing the plugin. (Inherited from DualityPlugin.)
Protected method | OnExecContextChanged | Called when Dualitys DualityAppExecutionContext changes.
Top
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin.InitPlugin Method

CorePluginInitPlugin Method
Called when initializing the plugin. It is guaranteed that all plugins have been loaded at this point, so this is the ideal place to establish communication with other plugins or load Resources that may rely on them. It is NOT defined whether or not other plugins have been initialized yet.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal virtual void InitPlugin()
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin.OnAfterUpdate Method

CorePluginOnAfterUpdate Method
Called after Duality updates the game scene

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal virtual void OnAfterUpdate()
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin.OnBeforeUpdate Method

CorePluginOnBeforeUpdate Method
Called before Duality updates the game scene

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal virtual void OnBeforeUpdate()
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin.OnExecContextChanged Method

CorePluginOnExecContextChanged Method
Called when Dualitys DualityAppExecutionContext changes.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal virtual void OnExecContextChanged(
    DualityAppExecutionContext previousContext
)

Parameters

previousContext
Type: DualityDualityAppExecutionContext
See Also

Reference

CorePlugin Class
Duality Namespace


CorePlugin Properties

CorePlugin Properties

The CorePlugin type exposes the following members.

Properties
 | Name | Description
Public property | AssemblyName | (Inherited from DualityPlugin.)
Public property | Disposed | (Inherited from DualityPlugin.)
Public property | FileHash | (Inherited from DualityPlugin.)
Public property | FilePath | (Inherited from DualityPlugin.)
Public property | PluginAssembly | (Inherited from DualityPlugin.)
Top
See Also

Reference

CorePlugin Class
Duality Namespace


CorePluginEventArgs Class

CorePluginEventArgs Class

Note: This API is now obsolete.

Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityCorePluginEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityPluginEventArgs instead.")]
public class CorePluginEventArgs : EventArgs

The CorePluginEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | CorePluginEventArgs | Initializes a new instance of the CorePluginEventArgs class
Top
Properties
 | Name | Description
Public property | Plugins |
Top
See Also

Reference

Duality Namespace


CorePluginEventArgs Constructor

CorePluginEventArgs Constructor
Initializes a new instance of the CorePluginEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CorePluginEventArgs(
    IEnumerable<CorePlugin> plugins
)

Parameters

plugins
Type: System.Collections.GenericIEnumerable CorePlugin
See Also

Reference

CorePluginEventArgs Class
Duality Namespace


CorePluginEventArgs Properties

CorePluginEventArgs Properties

The CorePluginEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Plugins |
Top
See Also

Reference

CorePluginEventArgs Class
Duality Namespace


CorePluginEventArgs.Plugins Property

CorePluginEventArgsPlugins Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IReadOnlyList Plugins { get; }

Property Value

Type: IReadOnlyListT
See Also

Reference

CorePluginEventArgs Class
Duality Namespace


CorePluginManager Class

CorePluginManager Class
Manages loading, reloading, initialization and disposal of Duality core plugins. Since all assemblies are owned by the .Net runtime that only exposes a very limited degree of control, this class should only be used statically: Disposing it would only get rid of management data, not of the actual plugin assemblies, which would then cause problems. A static instance of this class is available through PluginManager.
Inheritance Hierarchy
SystemObject
DualityPluginManager CorePlugin
DualityCorePluginManager

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CorePluginManager : PluginManager<CorePlugin>

The CorePluginManager type exposes the following members.

Methods
 | Name | Description
Public method | ClearPlugins | Disposes all loaded plugins and discards all related content / data. (Inherited from PluginManagerT.)
Public method | DiscardPluginData | Requests the disposal of all content / data that is dependent on any of the currently active plugins. This functioanlity is invoked automatically as part of reloading or removing plugins. (Inherited from PluginManagerT.)
Public method | GetAssemblies | Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins. (Overrides PluginManagerTGetAssemblies.)
Public method | GetTypes | Enumerates all locally available Types that are assignable to the specified Type. (Inherited from PluginManagerT.)
Public method | Init | Initializes the PluginManagerT with the specified IPluginLoader. This method needs to be called once after instantiation (or previous termination) before plugins can be loaded. (Inherited from PluginManagerT.)
Public method | InitPlugin | Initializes the specified plugin. This concludes a manual plugin load or reload operation using API like LoadPlugin(Assembly, String) and ReloadPlugin(String). (Inherited from PluginManagerT.)
Public method | InitPlugins | Initializes all previously loaded plugins. (Overrides PluginManagerTInitPlugins.)
Public method | InvokeAfterUpdate | Invokes each plugin's OnAfterUpdate event handler.
Public method | InvokeBeforeUpdate | Invokes each plugin's OnBeforeUpdate event handler.
Public method | InvokeExecContextChanged | Invokes each plugin's OnExecContextChanged(DualityAppExecutionContext) event handler.
Protected method | LoadPlugin(String) | (Inherited from PluginManagerT.)
Public method | LoadPlugin(Assembly, String) | Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically. (Inherited from PluginManagerT.)
Public method | LoadPlugins | Loads all available core plugins, as well as auxilliary libraries. (Overrides PluginManagerTLoadPlugins.)
Public method | LockPlugin | Locks the specified plugin assembly, so any reload attempts are blocked. (Inherited from PluginManagerT.)
Protected method | OnInit | (Overrides PluginManagerTOnInit.)
Protected method | OnInitPlugin | (Overrides PluginManagerTOnInitPlugin(T).)
Protected method | OnTerminate | (Overrides PluginManagerTOnTerminate.)
Public method | ReloadPlugin | Reloads the specified plugin. Does not initialize it. (Inherited from PluginManagerT.)
Protected method | RemovePlugin | (Inherited from PluginManagerT.)
Public method | Terminate | Terminates the PluginManagerT. This will dispose all Duality plugins and plugin data. (Inherited from PluginManagerT.)
Public method | UnlockPlugin | Unlocks the specified plugin assembly, so future attempts at reloading will no longer be blocked. (Inherited from PluginManagerT.)
Top
Properties
 | Name | Description
Public property | DisposedPlugins | [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary. (Inherited from PluginManagerT.)
Public property | LoadedPlugins | [GET] Enumerates all currently loaded plugins. (Inherited from PluginManagerT.)
Public property | PluginLoader | [GET] The plugin loader which is used by the PluginManagerT to discover and load available plugin assemblies. (Inherited from PluginManagerT.)
Protected property | PluginLog | [GET / SET] An optional Log which is used for logging plugin loading states and issues. (Inherited from PluginManagerT.)
Protected property | PluginRegistry | [GET] Maps assembly names to currently loaded plugins. (Inherited from PluginManagerT.)
Top
Events
 | Name | Description
Public event | PluginsReady | Fired whenever a Duality plugin has been initialized. This is the case after loading or reloading one. (Inherited from PluginManagerT.)
Public event | PluginsRemoved | Called right after removing a plugin. This allows other system to clear their internal caches and clean up everything that might have been left by the removed plugin. No plugin code is run after this event has been called. (Inherited from PluginManagerT.)
Public event | PluginsRemoving | Called right before removing a plugin. This allows other systems to get rid of data and content that still depends on those plugins. Note that it is possible for some plugin termination / disposal code to be run after this event. (Inherited from PluginManagerT.)
Top
See Also

Reference

Duality Namespace


CorePluginManager Methods

CorePluginManager Methods

The CorePluginManager type exposes the following members.

Methods
 | Name | Description
Public method | ClearPlugins | Disposes all loaded plugins and discards all related content / data. (Inherited from PluginManagerT.)
Public method | DiscardPluginData | Requests the disposal of all content / data that is dependent on any of the currently active plugins. This functioanlity is invoked automatically as part of reloading or removing plugins. (Inherited from PluginManagerT.)
Public method | GetAssemblies | Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins. (Overrides PluginManagerTGetAssemblies.)
Public method | GetTypes | Enumerates all locally available Types that are assignable to the specified Type. (Inherited from PluginManagerT.)
Public method | Init | Initializes the PluginManagerT with the specified IPluginLoader. This method needs to be called once after instantiation (or previous termination) before plugins can be loaded. (Inherited from PluginManagerT.)
Public method | InitPlugin | Initializes the specified plugin. This concludes a manual plugin load or reload operation using API like LoadPlugin(Assembly, String) and ReloadPlugin(String). (Inherited from PluginManagerT.)
Public method | InitPlugins | Initializes all previously loaded plugins. (Overrides PluginManagerTInitPlugins.)
Public method | InvokeAfterUpdate | Invokes each plugin's OnAfterUpdate event handler.
Public method | InvokeBeforeUpdate | Invokes each plugin's OnBeforeUpdate event handler.
Public method | InvokeExecContextChanged | Invokes each plugin's OnExecContextChanged(DualityAppExecutionContext) event handler.
Protected method | LoadPlugin(String) | (Inherited from PluginManagerT.)
Public method | LoadPlugin(Assembly, String) | Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically. (Inherited from PluginManagerT.)
Public method | LoadPlugins | Loads all available core plugins, as well as auxilliary libraries. (Overrides PluginManagerTLoadPlugins.)
Public method | LockPlugin | Locks the specified plugin assembly, so any reload attempts are blocked. (Inherited from PluginManagerT.)
Protected method | OnInit | (Overrides PluginManagerTOnInit.)
Protected method | OnInitPlugin | (Overrides PluginManagerTOnInitPlugin(T).)
Protected method | OnTerminate | (Overrides PluginManagerTOnTerminate.)
Public method | ReloadPlugin | Reloads the specified plugin. Does not initialize it. (Inherited from PluginManagerT.)
Protected method | RemovePlugin | (Inherited from PluginManagerT.)
Public method | Terminate | Terminates the PluginManagerT. This will dispose all Duality plugins and plugin data. (Inherited from PluginManagerT.)
Public method | UnlockPlugin | Unlocks the specified plugin assembly, so future attempts at reloading will no longer be blocked. (Inherited from PluginManagerT.)
Top
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.GetAssemblies Method

CorePluginManagerGetAssemblies Method
Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override IEnumerable<Assembly> GetAssemblies()

Return Value

Type: IEnumerable Assembly
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.InitPlugins Method

CorePluginManagerInitPlugins Method
Initializes all previously loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void InitPlugins()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.InvokeAfterUpdate Method

CorePluginManagerInvokeAfterUpdate Method
Invokes each plugin's OnAfterUpdate event handler.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InvokeAfterUpdate()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.InvokeBeforeUpdate Method

CorePluginManagerInvokeBeforeUpdate Method
Invokes each plugin's OnBeforeUpdate event handler.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InvokeBeforeUpdate()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.InvokeExecContextChanged Method

CorePluginManagerInvokeExecContextChanged Method
Invokes each plugin's OnExecContextChanged(DualityAppExecutionContext) event handler.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InvokeExecContextChanged(
    DualityAppExecutionContext previousContext
)

Parameters

previousContext
Type: DualityDualityAppExecutionContext
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.LoadPlugins Method

CorePluginManagerLoadPlugins Method
Loads all available core plugins, as well as auxilliary libraries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void LoadPlugins()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.OnInit Method

CorePluginManagerOnInit Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnInit()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.OnInitPlugin Method

CorePluginManagerOnInitPlugin Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnInitPlugin(
    CorePlugin plugin
)

Parameters

plugin
Type: DualityCorePlugin
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager.OnTerminate Method

CorePluginManagerOnTerminate Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnTerminate()
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager Properties

CorePluginManager Properties

The CorePluginManager type exposes the following members.

Properties
 | Name | Description
Public property | DisposedPlugins | [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary. (Inherited from PluginManagerT.)
Public property | LoadedPlugins | [GET] Enumerates all currently loaded plugins. (Inherited from PluginManagerT.)
Public property | PluginLoader | [GET] The plugin loader which is used by the PluginManagerT to discover and load available plugin assemblies. (Inherited from PluginManagerT.)
Protected property | PluginLog | [GET / SET] An optional Log which is used for logging plugin loading states and issues. (Inherited from PluginManagerT.)
Protected property | PluginRegistry | [GET] Maps assembly names to currently loaded plugins. (Inherited from PluginManagerT.)
Top
See Also

Reference

CorePluginManager Class
Duality Namespace


CorePluginManager Events

CorePluginManager Events

The CorePluginManager type exposes the following members.

Events
 | Name | Description
Public event | PluginsReady | Fired whenever a Duality plugin has been initialized. This is the case after loading or reloading one. (Inherited from PluginManagerT.)
Public event | PluginsRemoved | Called right after removing a plugin. This allows other system to clear their internal caches and clean up everything that might have been left by the removed plugin. No plugin code is run after this event has been called. (Inherited from PluginManagerT.)
Public event | PluginsRemoving | Called right before removing a plugin. This allows other systems to get rid of data and content that still depends on those plugins. Note that it is possible for some plugin termination / disposal code to be run after this event. (Inherited from PluginManagerT.)
Top
See Also

Reference

CorePluginManager Class
Duality Namespace


DontSerializeAttribute Class

DontSerializeAttribute Class
Flags a class, struct or field as inappropriate for serialization.
Inheritance Hierarchy
SystemObject
SystemAttribute
DualityDontSerializeAttribute

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public class DontSerializeAttribute : Attribute

The DontSerializeAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | DontSerializeAttribute | Initializes a new instance of the DontSerializeAttribute class
Top
See Also

Reference

Duality Namespace


DontSerializeAttribute Constructor

DontSerializeAttribute Constructor
Initializes a new instance of the DontSerializeAttribute class

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public DontSerializeAttribute()
See Also

Reference

DontSerializeAttribute Class
Duality Namespace


DontSerializeResourceAttribute Class

DontSerializeResourceAttribute Class
Indicates that a field will be assumed null when serializing it as part of a Resource serialization.
Inheritance Hierarchy
SystemObject
SystemAttribute
DualityDontSerializeResourceAttribute

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DontSerializeResourceAttribute : Attribute

The DontSerializeResourceAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | DontSerializeResourceAttribute | Initializes a new instance of the DontSerializeResourceAttribute class
Top
See Also

Reference

Duality Namespace


DontSerializeResourceAttribute Constructor

DontSerializeResourceAttribute Constructor
Initializes a new instance of the DontSerializeResourceAttribute class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DontSerializeResourceAttribute()
See Also

Reference

DontSerializeResourceAttribute Class
Duality Namespace


DualityApp Class

DualityApp Class
This class controls Duality's main program flow control and general maintenance functionality. It initializes the engine, loads plugins, provides access to user input, houses global data structures and handles logfiles internally.
Inheritance Hierarchy
SystemObject
DualityDualityApp

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class DualityApp

The DualityApp type exposes the following members.

Methods
Name | Description
ApplyResolution | Applies the specified screen resolution to both game and display device. This is a shorthand for assigning a modified version of DualityUserData to UserData.
Dbg | This method performs an action only when compiling your plugin in debug mode. In release mode, any calls to this method (and thus the specified action) are omitted by the compiler. It is essentially syntactical sugar for one-line #if DEBUG blocks. This method is intended to be used conveniently in conjunction with lambda expressions.
DisposeLater | Schedules the specified object for disposal. It is guaranteed to be disposed by the end of the current update cycle.
EditorGuard | When executed from within the editor environment, this method wraps the specified action in a safe try-catch block in order to be able to recover gracefully. In regular game execution, it will simply invoke the action without safety measures.
GetAvailDualityTypes | Enumerates all available Duality Types that are assignable to the specified Type.
GetDualityAssemblies | Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins.
Init | Initializes this DualityApp. Should be called before performing any operations within Duality.
InitPostWindow | Initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality. Is called implicitly when using OpenWindow(WindowOptions).
LoadAppData | Triggers Duality to (re)load its DualityAppData.
LoadPlugin | Obsolete. Adds an already loaded plugin Assembly to the internal Duality CorePlugin registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.
LoadUserData | Triggers Duality to (re)load its DualityUserData.
OpenWindow | Opens up a window for Duality to render into. This also initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality.
Render | Performs a single render cycle.
RunCleanup | Performs all scheduled disposal calls and cleans up internal data. This is done automatically at the end of each frame update and you shouldn't need to call this in general. Invoking this method while an update is still in progress may result in undefined behavior. Don't do this.
SaveAppData | Triggers Duality to save its DualityAppData.
SaveUserData | Triggers Duality to save its DualityUserData.
Terminate | Terminates this DualityApp. This does not end the current Process, but will instruct the engine to leave main loop and message processing as soon as possible.
Update | Performs a single update cycle.
Top
Fields
Name | Description
CmdArgDebug |
CmdArgEditor |
CmdArgProfiling |
DataDirectory |
PluginDirectory |
Top
Properties
Name | Description
AppData | [GET / SET] Provides access to Duality's current application data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.
AppDataPath | [GET] Returns the path where this DualityApp's application data is located at.
AudioBackend | [GET] The audio backend that is used by Duality. Don't use this unless you know exactly what you're doing.
DisposedPlugins | Obsolete. [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.
ExecContext | [GET] Returns the DualityAppExecutionContext in which this DualityApp is currently running.
ExecEnvironment | [GET] Returns the DualityAppExecutionEnvironment in which this DualityApp is currently running.
Gamepads | [GET] Provides access to gamepad user input.
GraphicsBackend | [GET] The graphics backend that is used by Duality. Don't use this unless you know exactly what you're doing.
IsFocused | [GET] Returns whether the Duality application is currently focused, i.e. can be considered to be the users main activity right now.
Joysticks | [GET] Provides access to extended user input via joystick or gamepad.
Keyboard | [GET] Provides access to keyboard user input
LoadedPlugins | Obsolete. [GET] Enumerates all currently loaded plugins.
Mouse | [GET] Provides access to mouse user input.
PluginLoader | [GET] The plugin loader that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the PluginManager. If you want to load a non-plugin Assembly, use the IPluginLoader from this property.
PluginManager | [GET] The plugin manager that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the CorePluginManager from this property. If you want to load a non-plugin Assembly, use the PluginLoader.
Sound | [GET] Provides access to the main SoundDevice.
SystemBackend | [GET] The system backend that is used by Duality. Don't use this unless you know exactly what you're doing.
TargetResolution | [GET / SET] The size of the current rendering surface (full screen, a single window, etc.) in pixels. Setting this will not actually change Duality's state - this is a pure "for your information" property.
UserData | [GET / SET] Provides access to Duality's current user data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.
UserDataPath | [GET] Returns the path where this DualityApp's user data is located at.
Top
Events
Name | Description
AppDataChanged | Called when the games AppData changes
DiscardPluginData | Obsolete. Called when Duality needs to discard plugin data such as cached Types and values.
FocusChanged | Called when the game becomes focused or loses focus.
PluginReady | Obsolete. Fired whenever a core plugin has been initialized. This is the case after loading or reloading one.
Terminating | Called when Duality is being terminated by choice (e.g. not because of crashes or similar). It is also called in an editor environment.
UserDataChanged | Called when the games UserData changes
Top
See Also

Reference

Duality Namespace


DualityApp Fields

DualityApp Fields

The DualityApp type exposes the following members.

Fields
Name | Description
CmdArgDebug |
CmdArgEditor |
CmdArgProfiling |
DataDirectory |
PluginDirectory |
Top
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.CmdArgDebug Field

DualityAppCmdArgDebug Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CmdArgDebug

Field Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.CmdArgEditor Field

DualityAppCmdArgEditor Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CmdArgEditor

Field Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.CmdArgProfiling Field

DualityAppCmdArgProfiling Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CmdArgProfiling

Field Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.DataDirectory Field

DualityAppDataDirectory Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string DataDirectory

Field Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.PluginDirectory Field

DualityAppPluginDirectory Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string PluginDirectory

Field Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp Methods

DualityApp Methods

The DualityApp type exposes the following members.

Methods
Name | Description
ApplyResolution | Applies the specified screen resolution to both game and display device. This is a shorthand for assigning a modified version of DualityUserData to UserData.
Dbg | This method performs an action only when compiling your plugin in debug mode. In release mode, any calls to this method (and thus the specified action) are omitted by the compiler. It is essentially syntactical sugar for one-line #if DEBUG blocks. This method is intended to be used conveniently in conjunction with lambda expressions.
DisposeLater | Schedules the specified object for disposal. It is guaranteed to be disposed by the end of the current update cycle.
EditorGuard | When executed from within the editor environment, this method wraps the specified action in a safe try-catch block in order to be able to recover gracefully. In regular game execution, it will simply invoke the action without safety measures.
GetAvailDualityTypes | Enumerates all available Duality Types that are assignable to the specified Type.
GetDualityAssemblies | Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins.
Init | Initializes this DualityApp. Should be called before performing any operations within Duality.
InitPostWindow | Initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality. Is called implicitly when using OpenWindow(WindowOptions).
LoadAppData | Triggers Duality to (re)load its DualityAppData.
LoadPlugin | Obsolete. Adds an already loaded plugin Assembly to the internal Duality CorePlugin registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.
LoadUserData | Triggers Duality to (re)load its DualityUserData.
OpenWindow | Opens up a window for Duality to render into. This also initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality.
Render | Performs a single render cycle.
RunCleanup | Performs all scheduled disposal calls and cleans up internal data. This is done automatically at the end of each frame update and you shouldn't need to call this in general. Invoking this method while an update is still in progress may result in undefined behavior. Don't do this.
SaveAppData | Triggers Duality to save its DualityAppData.
SaveUserData | Triggers Duality to save its DualityUserData.
Terminate | Terminates this DualityApp. This does not end the current Process, but will instruct the engine to leave main loop and message processing as soon as possible.
Update | Performs a single update cycle.
Top
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.ApplyResolution Method

DualityAppApplyResolution Method
Applies the specified screen resolution to both game and display device. This is a shorthand for assigning a modified version of DualityUserData to UserData.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void ApplyResolution(
    int width,
    int height,
    bool fullscreen
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
fullscreen
Type: SystemBoolean
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Dbg Method

DualityAppDbg Method
This method performs an action only when compiling your plugin in debug mode. In release mode, any calls to this method (and thus the specified action) are omitted by the compiler. It is essentially syntactical sugar for one-line #if DEBUG blocks. This method is intended to be used conveniently in conjunction with lambda expressions.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Dbg(
    Action action
)

Parameters

action
Type: SystemAction
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.DisposeLater Method

DualityAppDisposeLater Method
Schedules the specified object for disposal. It is guaranteed to be disposed by the end of the current update cycle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void DisposeLater(
    Object o
)

Parameters

o
Type: SystemObject
The object to schedule for disposal.
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.EditorGuard Method

DualityAppEditorGuard Method
When executed from within the editor environment, this method wraps the specified action in a safe try-catch block in order to be able to recover gracefully. In regular game execution, it will simply invoke the action without safety measures.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void EditorGuard(
    Action action
)

Parameters

action
Type: SystemAction
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.GetAvailDualityTypes Method

DualityAppGetAvailDualityTypes Method
Enumerates all available Duality Types that are assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<TypeInfo> GetAvailDualityTypes(
    Type baseType
)

Parameters

baseType
Type: SystemType
The base type to use for matching the result types.

Return Value

Type: IEnumerable TypeInfo
An enumeration of all Duality types deriving from the specified type.
Examples
The following code logs all available kinds of Renderers:
Copy
1var rendererTypes = DualityApp.GetAvailDualityTypes(typeof(Duality.Components.Renderer));
2foreach (Type rt in rendererTypes)
3{
4    Log.Core.Write("Renderer Type '{0}' from Assembly '{1}'", Log.Type(rt), rt.Assembly.FullName);
5}
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.GetDualityAssemblies Method

DualityAppGetDualityAssemblies Method
Enumerates all currently loaded assemblies that are part of Duality, i.e. Duality itsself and all loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Assembly> GetDualityAssemblies()

Return Value

Type: IEnumerable Assembly
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Init Method

DualityAppInit Method
Initializes this DualityApp. Should be called before performing any operations within Duality.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Init(
    DualityAppExecutionEnvironment env,
    DualityAppExecutionContext context,
    IPluginLoader plugins,
    string[] commandLineArgs
)

Parameters

env
Type: DualityDualityAppExecutionEnvironment
context
Type: DualityDualityAppExecutionContext
The DualityAppExecutionContext in which Duality runs.
plugins
Type: Duality.BackendIPluginLoader
commandLineArgs
Type: SystemString
Command line arguments to run this DualityApp with. Usually these are just the ones from the host application, passed on.
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.InitPostWindow Method

DualityAppInitPostWindow Method
Initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality. Is called implicitly when using OpenWindow(WindowOptions).

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void InitPostWindow()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.LoadAppData Method

DualityAppLoadAppData Method
Triggers Duality to (re)load its DualityAppData.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void LoadAppData()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.LoadPlugin Method

DualityAppLoadPlugin Method

Note: This API is now obsolete.

Adds an already loaded plugin Assembly to the internal Duality CorePlugin registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityApp.PluginManager instead.")]
public static CorePlugin LoadPlugin(
    Assembly pluginAssembly,
    string pluginFilePath
)

Parameters

pluginAssembly
Type: System.ReflectionAssembly
pluginFilePath
Type: SystemString

Return Value

Type: CorePlugin
Remarks
This method can be useful in certain cases when it is necessary to treat an Assembly as a Duality plugin, even though it isn't located in the Plugins folder, or is not available as a file at all. A typical case for this is Unit Testing where the testing Assembly may specify additional Duality types such as Components, Resources, etc.
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.LoadUserData Method

DualityAppLoadUserData Method
Triggers Duality to (re)load its DualityUserData.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void LoadUserData()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.OpenWindow Method

DualityAppOpenWindow Method
Opens up a window for Duality to render into. This also initializes the part of Duality that requires a valid rendering context. Should be called before performing any rendering related operations with Duality.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static INativeWindow OpenWindow(
    WindowOptions options
)

Parameters

options
Type: Duality.BackendWindowOptions

Return Value

Type: INativeWindow
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Render Method

DualityAppRender Method
Performs a single render cycle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Render(
    Rect viewportRect,
    Predicate<Camera> camPredicate = null
)

Parameters

viewportRect
Type: DualityRect
camPredicate (Optional)
Type: SystemPredicate Camera
Optional predicate to select which Cameras may be rendered and which not.
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.RunCleanup Method

DualityAppRunCleanup Method
Performs all scheduled disposal calls and cleans up internal data. This is done automatically at the end of each frame update and you shouldn't need to call this in general. Invoking this method while an update is still in progress may result in undefined behavior. Don't do this.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RunCleanup()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.SaveAppData Method

DualityAppSaveAppData Method
Triggers Duality to save its DualityAppData.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void SaveAppData()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.SaveUserData Method

DualityAppSaveUserData Method
Triggers Duality to save its DualityUserData.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void SaveUserData()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Terminate Method

DualityAppTerminate Method
Terminates this DualityApp. This does not end the current Process, but will instruct the engine to leave main loop and message processing as soon as possible.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Terminate()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Update Method

DualityAppUpdate Method
Performs a single update cycle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Update()
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp Properties

DualityApp Properties

The DualityApp type exposes the following members.

Properties
Name | Description
AppData | [GET / SET] Provides access to Duality's current application data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.
AppDataPath | [GET] Returns the path where this DualityApp's application data is located at.
AudioBackend | [GET] The audio backend that is used by Duality. Don't use this unless you know exactly what you're doing.
DisposedPlugins | Obsolete. [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.
ExecContext | [GET] Returns the DualityAppExecutionContext in which this DualityApp is currently running.
ExecEnvironment | [GET] Returns the DualityAppExecutionEnvironment in which this DualityApp is currently running.
Gamepads | [GET] Provides access to gamepad user input.
GraphicsBackend | [GET] The graphics backend that is used by Duality. Don't use this unless you know exactly what you're doing.
IsFocused | [GET] Returns whether the Duality application is currently focused, i.e. can be considered to be the users main activity right now.
Joysticks | [GET] Provides access to extended user input via joystick or gamepad.
Keyboard | [GET] Provides access to keyboard user input
LoadedPlugins | Obsolete. [GET] Enumerates all currently loaded plugins.
Mouse | [GET] Provides access to mouse user input.
PluginLoader | [GET] The plugin loader that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the PluginManager. If you want to load a non-plugin Assembly, use the IPluginLoader from this property.
PluginManager | [GET] The plugin manager that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the CorePluginManager from this property. If you want to load a non-plugin Assembly, use the PluginLoader.
Sound | [GET] Provides access to the main SoundDevice.
SystemBackend | [GET] The system backend that is used by Duality. Don't use this unless you know exactly what you're doing.
TargetResolution | [GET / SET] The size of the current rendering surface (full screen, a single window, etc.) in pixels. Setting this will not actually change Duality's state - this is a pure "for your information" property.
UserData | [GET / SET] Provides access to Duality's current user data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.
UserDataPath | [GET] Returns the path where this DualityApp's user data is located at.
Top
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.AppData Property

DualityAppAppData Property
[GET / SET] Provides access to Duality's current application data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static DualityAppData AppData { get; set; }

Property Value

Type: DualityAppData
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.AppDataPath Property

DualityAppAppDataPath Property
[GET] Returns the path where this DualityApp's application data is located at.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string AppDataPath { get; }

Property Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.AudioBackend Property

DualityAppAudioBackend Property
[GET] The audio backend that is used by Duality. Don't use this unless you know exactly what you're doing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IAudioBackend AudioBackend { get; }

Property Value

Type: IAudioBackend
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.DisposedPlugins Property

DualityAppDisposedPlugins Property

Note: This API is now obsolete.

[GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityApp.PluginManager instead.")]
public static IEnumerable<Assembly> DisposedPlugins { get; }

Property Value

Type: IEnumerable Assembly
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.ExecContext Property

DualityAppExecContext Property
[GET] Returns the DualityAppExecutionContext in which this DualityApp is currently running.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static DualityAppExecutionContext ExecContext { get; }

Property Value

Type: DualityAppExecutionContext
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.ExecEnvironment Property

DualityAppExecEnvironment Property
[GET] Returns the DualityAppExecutionEnvironment in which this DualityApp is currently running.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static DualityAppExecutionEnvironment ExecEnvironment { get; }

Property Value

Type: DualityAppExecutionEnvironment
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Gamepads Property

DualityAppGamepads Property
[GET] Provides access to gamepad user input.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static GamepadInputCollection Gamepads { get; }

Property Value

Type: GamepadInputCollection
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.GraphicsBackend Property

DualityAppGraphicsBackend Property
[GET] The graphics backend that is used by Duality. Don't use this unless you know exactly what you're doing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IGraphicsBackend GraphicsBackend { get; }

Property Value

Type: IGraphicsBackend
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.IsFocused Property

DualityAppIsFocused Property
[GET] Returns whether the Duality application is currently focused, i.e. can be considered to be the users main activity right now.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsFocused { get; }

Property Value

Type: Boolean
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Joysticks Property

DualityAppJoysticks Property
[GET] Provides access to extended user input via joystick or gamepad.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static JoystickInputCollection Joysticks { get; }

Property Value

Type: JoystickInputCollection
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Keyboard Property

DualityAppKeyboard Property
[GET] Provides access to keyboard user input

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static KeyboardInput Keyboard { get; }

Property Value

Type: KeyboardInput
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.LoadedPlugins Property

DualityAppLoadedPlugins Property

Note: This API is now obsolete.

[GET] Enumerates all currently loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityApp.PluginManager instead.")]
public static IEnumerable<CorePlugin> LoadedPlugins { get; }

Property Value

Type: IEnumerable CorePlugin
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Mouse Property

DualityAppMouse Property
[GET] Provides access to mouse user input.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static MouseInput Mouse { get; }

Property Value

Type: MouseInput
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.PluginLoader Property

DualityAppPluginLoader Property
[GET] The plugin loader that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the PluginManager. If you want to load a non-plugin Assembly, use the IPluginLoader from this property.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IPluginLoader PluginLoader { get; }

Property Value

Type: IPluginLoader
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.PluginManager Property

DualityAppPluginManager Property
[GET] The plugin manager that is used by Duality. Don't use this unless you know exactly what you're doing. If you want to load a plugin, use the CorePluginManager from this property. If you want to load a non-plugin Assembly, use the PluginLoader.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static CorePluginManager PluginManager { get; }

Property Value

Type: CorePluginManager
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Sound Property

DualityAppSound Property
[GET] Provides access to the main SoundDevice.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static SoundDevice Sound { get; }

Property Value

Type: SoundDevice
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.SystemBackend Property

DualityAppSystemBackend Property
[GET] The system backend that is used by Duality. Don't use this unless you know exactly what you're doing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ISystemBackend SystemBackend { get; }

Property Value

Type: ISystemBackend
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.TargetResolution Property

DualityAppTargetResolution Property
[GET / SET] The size of the current rendering surface (full screen, a single window, etc.) in pixels. Setting this will not actually change Duality's state - this is a pure "for your information" property.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 TargetResolution { get; set; }

Property Value

Type: Vector2
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.UserData Property

DualityAppUserData Property
[GET / SET] Provides access to Duality's current user data. This is never null. Any kind of data change event is fired as soon as you re-assign this property. Be sure to do that after changing its data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static DualityUserData UserData { get; set; }

Property Value

Type: DualityUserData
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.UserDataPath Property

DualityAppUserDataPath Property
[GET] Returns the path where this DualityApp's user data is located at.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string UserDataPath { get; }

Property Value

Type: String
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp Events

DualityApp Events

The DualityApp type exposes the following members.

Events
Name | Description
AppDataChanged | Called when the games AppData changes
DiscardPluginData | Obsolete. Called when Duality needs to discard plugin data such as cached Types and values.
FocusChanged | Called when the game becomes focused or loses focus.
PluginReady | Obsolete. Fired whenever a core plugin has been initialized. This is the case after loading or reloading one.
Terminating | Called when Duality is being terminated by choice (e.g. not because of crashes or similar). It is also called in an editor environment.
UserDataChanged | Called when the games UserData changes
Top
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.AppDataChanged Event

DualityAppAppDataChanged Event
Called when the games AppData changes

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler AppDataChanged

Value

Type: SystemEventHandler
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.DiscardPluginData Event

DualityAppDiscardPluginData Event

Note: This API is now obsolete.

Called when Duality needs to discard plugin data such as cached Types and values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityApp.PluginManager instead.")]
public static event EventHandler DiscardPluginData

Value

Type: SystemEventHandler
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.FocusChanged Event

DualityAppFocusChanged Event
Called when the game becomes focused or loses focus.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler FocusChanged

Value

Type: SystemEventHandler
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.PluginReady Event

DualityAppPluginReady Event

Note: This API is now obsolete.

Fired whenever a core plugin has been initialized. This is the case after loading or reloading one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Use DualityApp.PluginManager instead.")]
public static event EventHandler<CorePluginEventArgs> PluginReady

Value

Type: SystemEventHandler CorePluginEventArgs
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.Terminating Event

DualityAppTerminating Event
Called when Duality is being terminated by choice (e.g. not because of crashes or similar). It is also called in an editor environment.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler Terminating

Value

Type: SystemEventHandler
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.UserDataChanged Event

DualityAppUserDataChanged Event
Called when the games UserData changes

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler UserDataChanged

Value

Type: SystemEventHandler
See Also

Reference

DualityApp Class
Duality Namespace


DualityApp.ExecutionContext Enumeration

DualityAppExecutionContext Enumeration
Describes the context in which the current DualityApp runs.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ExecutionContext
Members
Member name | Value | Description
Terminated | 0 | Duality has been terminated. There is no guarantee that any object is still valid or usable.
Unknown | 1 | The context in which Duality is executed is unknown.
Game | 2 | Duality runs in a game environment.
Editor | 3 | Duality runs in an editing environment.
See Also

Reference

Duality Namespace


DualityApp.ExecutionEnvironment Enumeration

DualityAppExecutionEnvironment Enumeration
Describes the environment in which the current DualityApp runs.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ExecutionEnvironment
Members
Member name | Value | Description
Unknown | 0 | The environment in which Duality is executed is unknown.
Launcher | 1 | Duality runs in the DualityLauncher
Editor | 2 | Duality runs in the DualityEditor
See Also

Reference

Duality Namespace


DualityAppData Class

DualityAppData Class
Provides general information about this Duality application / game.
Inheritance Hierarchy
SystemObject
DualityDualityAppData

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DualityAppData

The DualityAppData type exposes the following members.

Constructors
 | Name | Description
Public method | DualityAppData | Initializes a new instance of the DualityAppData class
Top
Properties
 | Name | Description
Public property | AppName | [GET / SET] The name of your application / game. It will also be used as a window title by the launcher app.
Public property | AuthorName | [GET / SET] The author name of your application. Might be your or your team's name or -nickname.
Public property | CustomData | [GET / SET] Use this property to store custom application data.
Public property | LocalUserData | [GET / SET] If true, user data is saved locally in the game folder instead of the current user account.
Public property | MultisampleBackBuffer | [GET / SET] Determines whether or not the backbuffer uses multisampling based on AntialiasingQuality. Set this to false if you don't render to the backbuffer directly, but use a custom RenderTarget setup. You'll have to apply possible existing user quality settings yourself.
Public property | PhysicsFixedTime | [GET / SET] Does the physics simulation use fixed time steps? However, this setting may be overwritten dynamically due to frame timing restrictions. To check whether fixed-timestep physics is currently active, use PhysicsFixedTime
Public property | PhysicsVelocityThreshold | [GET / SET] Any velocity below this value will be resolved using inelastic equations i.e. won't lead to "bouncing".
Public property | SkipBackends | [GET / SET] An optional list of backend Id values to skip when loading.
Public property | SoundDopplerFactor | [GET / SET] A factor by which the strength of the doppler effect is multiplied.
Public property | SpeedOfSound | [GET / SET] The speed of sound. While this is technically a unitless value, you might assume something like "meters per second". It is used to calculate the doppler effect of SoundInstances that are moving relative to the SoundListener.
Public property | StartScene | [GET / SET] A reference to the start Scene. It is used by the launcher app to determine which Scene to load initially.
Public property | Version | [GET / SET] The current application / game version.
Public property | WebsiteUrl | [GET / SET] The address of this game's official website or similar.
Top
See Also

Reference

Duality Namespace


DualityAppData Constructor

DualityAppData Constructor
Initializes a new instance of the DualityAppData class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DualityAppData()
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData Properties

DualityAppData Properties

The DualityAppData type exposes the following members.

Properties
 | Name | Description
Public property | AppName | [GET / SET] The name of your application / game. It will also be used as a window title by the launcher app.
Public property | AuthorName | [GET / SET] The author name of your application. Might be your or your team's name or -nickname.
Public property | CustomData | [GET / SET] Use this property to store custom application data.
Public property | LocalUserData | [GET / SET] If true, user data is saved locally in the game folder instead of the current user account.
Public property | MultisampleBackBuffer | [GET / SET] Determines whether or not the backbuffer uses multisampling based on AntialiasingQuality. Set this to false if you don't render to the backbuffer directly, but use a custom RenderTarget setup. You'll have to apply possible existing user quality settings yourself.
Public property | PhysicsFixedTime | [GET / SET] Does the physics simulation use fixed time steps? However, this setting may be overwritten dynamically due to frame timing restrictions. To check whether fixed-timestep physics is currently active, use PhysicsFixedTime
Public property | PhysicsVelocityThreshold | [GET / SET] Any velocity below this value will be resolved using inelastic equations i.e. won't lead to "bouncing".
Public property | SkipBackends | [GET / SET] An optional list of backend Id values to skip when loading.
Public property | SoundDopplerFactor | [GET / SET] A factor by which the strength of the doppler effect is multiplied.
Public property | SpeedOfSound | [GET / SET] The speed of sound. While this is technically a unitless value, you might assume something like "meters per second". It is used to calculate the doppler effect of SoundInstances that are moving relative to the SoundListener.
Public property | StartScene | [GET / SET] A reference to the start Scene. It is used by the launcher app to determine which Scene to load initially.
Public property | Version | [GET / SET] The current application / game version.
Public property | WebsiteUrl | [GET / SET] The address of this game's official website or similar.
Top
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.AppName Property

DualityAppDataAppName Property
[GET / SET] The name of your application / game. It will also be used as a window title by the launcher app.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string AppName { get; set; }

Property Value

Type: String
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.AuthorName Property

DualityAppDataAuthorName Property
[GET / SET] The author name of your application. Might be your or your team's name or -nickname.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string AuthorName { get; set; }

Property Value

Type: String
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.CustomData Property

DualityAppDataCustomData Property
[GET / SET] Use this property to store custom application data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object CustomData { get; set; }

Property Value

Type: Object
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.LocalUserData Property

DualityAppDataLocalUserData Property
[GET / SET] If true, user data is saved locally in the game folder instead of the current user account.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool LocalUserData { get; set; }

Property Value

Type: Boolean
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.MultisampleBackBuffer Property

DualityAppDataMultisampleBackBuffer Property
[GET / SET] Determines whether or not the backbuffer uses multisampling based on AntialiasingQuality. Set this to false if you don't render to the backbuffer directly, but use a custom RenderTarget setup. You'll have to apply possible existing user quality settings yourself.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool MultisampleBackBuffer { get; set; }

Property Value

Type: Boolean
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.PhysicsFixedTime Property

DualityAppDataPhysicsFixedTime Property
[GET / SET] Does the physics simulation use fixed time steps? However, this setting may be overwritten dynamically due to frame timing restrictions. To check whether fixed-timestep physics is currently active, use PhysicsFixedTime

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool PhysicsFixedTime { get; set; }

Property Value

Type: Boolean
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.PhysicsVelocityThreshold Property

DualityAppDataPhysicsVelocityThreshold Property
[GET / SET] Any velocity below this value will be resolved using inelastic equations i.e. won't lead to "bouncing".

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float PhysicsVelocityThreshold { get; set; }

Property Value

Type: Single
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.SkipBackends Property

DualityAppDataSkipBackends Property
[GET / SET] An optional list of backend Id values to skip when loading.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string[] SkipBackends { get; set; }

Property Value

Type: String
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.SoundDopplerFactor Property

DualityAppDataSoundDopplerFactor Property
[GET / SET] A factor by which the strength of the doppler effect is multiplied.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SoundDopplerFactor { get; set; }

Property Value

Type: Single
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.SpeedOfSound Property

DualityAppDataSpeedOfSound Property
[GET / SET] The speed of sound. While this is technically a unitless value, you might assume something like "meters per second". It is used to calculate the doppler effect of SoundInstances that are moving relative to the SoundListener.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SpeedOfSound { get; set; }

Property Value

Type: Single
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.StartScene Property

DualityAppDataStartScene Property
[GET / SET] A reference to the start Scene. It is used by the launcher app to determine which Scene to load initially.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Scene> StartScene { get; set; }

Property Value

Type: ContentRef Scene
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.Version Property

DualityAppDataVersion Property
[GET / SET] The current application / game version.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public uint Version { get; set; }

Property Value

Type: UInt32
See Also

Reference

DualityAppData Class
Duality Namespace


DualityAppData.WebsiteUrl Property

DualityAppDataWebsiteUrl Property
[GET / SET] The address of this game's official website or similar.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string WebsiteUrl { get; set; }

Property Value

Type: String
See Also

Reference

DualityAppData Class
Duality Namespace


DualityPlugin Class

DualityPlugin Class
Inheritance Hierarchy
SystemObject
DualityDualityPlugin
DualityCorePlugin

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class DualityPlugin

The DualityPlugin type exposes the following members.

Constructors
 | Name | Description
Protected method | DualityPlugin | Initializes a new instance of the DualityPlugin class
Top
Methods
 | Name | Description
Protected method | OnDisposePlugin | Called when unloading / disposing the plugin.
Top
Properties
 | Name | Description
Public property | AssemblyName |
Public property | Disposed |
Public property | FileHash |
Public property | FilePath |
Public property | PluginAssembly |
Top
See Also

Reference

Duality Namespace


DualityPlugin Constructor

DualityPlugin Constructor
Initializes a new instance of the DualityPlugin class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected DualityPlugin()
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin Methods

DualityPlugin Methods

The DualityPlugin type exposes the following members.

Methods
 | Name | Description
Protected method | OnDisposePlugin | Called when unloading / disposing the plugin.
Top
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.OnDisposePlugin Method

DualityPluginOnDisposePlugin Method
Called when unloading / disposing the plugin.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnDisposePlugin()
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin Properties

DualityPlugin Properties

The DualityPlugin type exposes the following members.

Properties
 | Name | Description
Public property | AssemblyName |
Public property | Disposed |
Public property | FileHash |
Public property | FilePath |
Public property | PluginAssembly |
Top
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.AssemblyName Property

DualityPluginAssemblyName Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string AssemblyName { get; }

Property Value

Type: String
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.Disposed Property

DualityPluginDisposed Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.FileHash Property

DualityPluginFileHash Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int FileHash { get; }

Property Value

Type: Int32
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.FilePath Property

DualityPluginFilePath Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FilePath { get; }

Property Value

Type: String
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPlugin.PluginAssembly Property

DualityPluginPluginAssembly Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Assembly PluginAssembly { get; }

Property Value

Type: Assembly
See Also

Reference

DualityPlugin Class
Duality Namespace


DualityPluginEventArgs Class

DualityPluginEventArgs Class
Provides event arguments related to CorePlugin instances.
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityDualityPluginEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DualityPluginEventArgs : EventArgs

The DualityPluginEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | DualityPluginEventArgs | Initializes a new instance of the DualityPluginEventArgs class
Top
Properties
 | Name | Description
Public property | Plugins |
Top
See Also

Reference

Duality Namespace


DualityPluginEventArgs Constructor

DualityPluginEventArgs Constructor
Initializes a new instance of the DualityPluginEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DualityPluginEventArgs(
    IEnumerable<DualityPlugin> plugins
)

Parameters

plugins
Type: System.Collections.GenericIEnumerable DualityPlugin
See Also

Reference

DualityPluginEventArgs Class
Duality Namespace


DualityPluginEventArgs Properties

DualityPluginEventArgs Properties

The DualityPluginEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Plugins |
Top
See Also

Reference

DualityPluginEventArgs Class
Duality Namespace


DualityPluginEventArgs.Plugins Property

DualityPluginEventArgsPlugins Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IReadOnlyList Plugins { get; }

Property Value

Type: IReadOnlyListT
See Also

Reference

DualityPluginEventArgs Class
Duality Namespace


DualityUserData Class

DualityUserData Class
Provides information about user settings for this Duality application / game. It is persistent beyond installing or deleting this Duality game.
Inheritance Hierarchy
SystemObject
DualityDualityUserData

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DualityUserData

The DualityUserData type exposes the following members.

Constructors
 | Name | Description
Public method | DualityUserData | Initializes a new instance of the DualityUserData class
Top
Properties
 | Name | Description
Public property | AntialiasingQuality | [GET / SET] Specifies the quality of anti-aliasing used in rendering.
Public property | CustomData | [GET / SET] Use this property to store custom user data.
Public property | GfxHeight | [GET / SET] Height of the game's display area.
Public property | GfxMode | [GET / SET] Describes the way the game window is set up.
Public property | GfxWidth | [GET / SET] Width of the game's display area.
Public property | RefreshMode | [GET / SET] Specifies the way in which Duality switches and refreshes visual and update frames.
Public property | SfxEffectVol | [GET / SET] Volume factor of sound effects. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SfxMasterVol | [GET / SET] Volume master factor for sound in general. This is applied automatically by the SoundDevice.
Public property | SfxMusicVol | [GET / SET] Volume factor of music. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SfxSpeechVol | [GET / SET] Volume factor of speech / vocals. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SystemCursorVisible | [GET / SET] Determines whether or not the system cursor should be visible in windowed mode.
Public property | UserName | [GET / SET] The player's name. This may be his main character's name or simply remain unused.
Top
See Also

Reference

Duality Namespace


DualityUserData Constructor

DualityUserData Constructor
Initializes a new instance of the DualityUserData class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DualityUserData()
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData Properties

DualityUserData Properties

The DualityUserData type exposes the following members.

Properties
 | Name | Description
Public property | AntialiasingQuality | [GET / SET] Specifies the quality of anti-aliasing used in rendering.
Public property | CustomData | [GET / SET] Use this property to store custom user data.
Public property | GfxHeight | [GET / SET] Height of the game's display area.
Public property | GfxMode | [GET / SET] Describes the way the game window is set up.
Public property | GfxWidth | [GET / SET] Width of the game's display area.
Public property | RefreshMode | [GET / SET] Specifies the way in which Duality switches and refreshes visual and update frames.
Public property | SfxEffectVol | [GET / SET] Volume factor of sound effects. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SfxMasterVol | [GET / SET] Volume master factor for sound in general. This is applied automatically by the SoundDevice.
Public property | SfxMusicVol | [GET / SET] Volume factor of music. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SfxSpeechVol | [GET / SET] Volume factor of speech / vocals. This is applied automatically by the SoundDevice based on the SoundType.
Public property | SystemCursorVisible | [GET / SET] Determines whether or not the system cursor should be visible in windowed mode.
Public property | UserName | [GET / SET] The player's name. This may be his main character's name or simply remain unused.
Top
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.AntialiasingQuality Property

DualityUserDataAntialiasingQuality Property
[GET / SET] Specifies the quality of anti-aliasing used in rendering.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AAQuality AntialiasingQuality { get; set; }

Property Value

Type: AAQuality
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.CustomData Property

DualityUserDataCustomData Property
[GET / SET] Use this property to store custom user data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object CustomData { get; set; }

Property Value

Type: Object
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.GfxHeight Property

DualityUserDataGfxHeight Property
[GET / SET] Height of the game's display area.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GfxHeight { get; set; }

Property Value

Type: Int32
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.GfxMode Property

DualityUserDataGfxMode Property
[GET / SET] Describes the way the game window is set up.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ScreenMode GfxMode { get; set; }

Property Value

Type: ScreenMode
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.GfxWidth Property

DualityUserDataGfxWidth Property
[GET / SET] Width of the game's display area.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GfxWidth { get; set; }

Property Value

Type: Int32
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.RefreshMode Property

DualityUserDataRefreshMode Property
[GET / SET] Specifies the way in which Duality switches and refreshes visual and update frames.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RefreshMode RefreshMode { get; set; }

Property Value

Type: RefreshMode
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.SfxEffectVol Property

DualityUserDataSfxEffectVol Property
[GET / SET] Volume factor of sound effects. This is applied automatically by the SoundDevice based on the SoundType.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SfxEffectVol { get; set; }

Property Value

Type: Single
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.SfxMasterVol Property

DualityUserDataSfxMasterVol Property
[GET / SET] Volume master factor for sound in general. This is applied automatically by the SoundDevice.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SfxMasterVol { get; set; }

Property Value

Type: Single
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.SfxMusicVol Property

DualityUserDataSfxMusicVol Property
[GET / SET] Volume factor of music. This is applied automatically by the SoundDevice based on the SoundType.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SfxMusicVol { get; set; }

Property Value

Type: Single
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.SfxSpeechVol Property

DualityUserDataSfxSpeechVol Property
[GET / SET] Volume factor of speech / vocals. This is applied automatically by the SoundDevice based on the SoundType.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float SfxSpeechVol { get; set; }

Property Value

Type: Single
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.SystemCursorVisible Property

DualityUserDataSystemCursorVisible Property
[GET / SET] Determines whether or not the system cursor should be visible in windowed mode.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool SystemCursorVisible { get; set; }

Property Value

Type: Boolean
See Also

Reference

DualityUserData Class
Duality Namespace


DualityUserData.UserName Property

DualityUserDataUserName Property
[GET / SET] The player's name. This may be his main character's name or simply remain unused.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string UserName { get; set; }

Property Value

Type: String
See Also

Reference

DualityUserData Class
Duality Namespace


ExplicitResourceReferenceAttribute Class

ExplicitResourceReferenceAttribute Class
Allows to explicitly specify what kinds of Resources a certain Resource Type is able to reference. This is an optional attribute that is used for certain runtime optimizations.
Inheritance Hierarchy
SystemObject
SystemAttribute
DualityExplicitResourceReferenceAttribute

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ExplicitResourceReferenceAttribute : Attribute

The ExplicitResourceReferenceAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | ExplicitResourceReferenceAttribute | Initializes a new instance of the ExplicitResourceReferenceAttribute class
Top
Properties
 | Name | Description
Public property | ReferencedTypes |
Top
See Also

Reference

Duality Namespace


ExplicitResourceReferenceAttribute Constructor

ExplicitResourceReferenceAttribute Constructor
Initializes a new instance of the ExplicitResourceReferenceAttribute class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ExplicitResourceReferenceAttribute(
    params Type[] referencedTypes
)

Parameters

referencedTypes
Type: SystemType
See Also

Reference

ExplicitResourceReferenceAttribute Class
Duality Namespace


ExplicitResourceReferenceAttribute Properties

ExplicitResourceReferenceAttribute Properties

The ExplicitResourceReferenceAttribute type exposes the following members.

Properties
 | Name | Description
Public property | ReferencedTypes |
Top
See Also

Reference

ExplicitResourceReferenceAttribute Class
Duality Namespace


ExplicitResourceReferenceAttribute.ReferencedTypes Property

ExplicitResourceReferenceAttributeReferencedTypes Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Type> ReferencedTypes { get; }

Property Value

Type: IEnumerable Type
See Also

Reference

ExplicitResourceReferenceAttribute Class
Duality Namespace


ExtMethodsAlignment Class

ExtMethodsAlignment Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsAlignment

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static class ExtMethodsAlignment
Methods
Name | Description
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
Top
See Also

Reference

Duality Namespace


ExtMethodsAlignment Methods

ExtMethodsAlignment Methods
Methods
Name | Description
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
Top
See Also

Reference

ExtMethodsAlignment Class
Duality Namespace


ExtMethodsAlignment.ApplyTo Method

ExtMethodsAlignmentApplyTo Method
Overload List
Name | Description
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Vector2, Vector2) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
ApplyTo(Alignment, Single, Single, Single, Single) | Applies the alignment to the specified vector.
Top
See Also

Reference

ExtMethodsAlignment Class
Duality Namespace


ExtMethodsAlignment.ApplyTo Method (Alignment, Vector2, Vector2)

ExtMethodsAlignmentApplyTo Method (Alignment, Vector2, Vector2)
Applies the alignment to the specified vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 ApplyTo(
    this Alignment align,
    Vector2 vec,
    Vector2 size
)

Parameters

align
Type: DualityAlignment
vec
Type: DualityVector2
size
Type: DualityVector2

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Alignment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsAlignment Class
ApplyTo Overload
Duality Namespace


ExtMethodsAlignment.ApplyTo Method (Alignment, Vector2, Vector2)

ExtMethodsAlignmentApplyTo Method (Alignment, Vector2, Vector2)
Applies the alignment to the specified vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void ApplyTo(
    this Alignment align,
    ref Vector2 vec,
    Vector2 size
)

Parameters

align
Type: DualityAlignment
vec
Type: DualityVector2
size
Type: DualityVector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Alignment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsAlignment Class
ApplyTo Overload
Duality Namespace


ExtMethodsAlignment.ApplyTo Method (Alignment, Vector2, Vector2)

ExtMethodsAlignmentApplyTo Method (Alignment, Vector2, Vector2)
Applies the alignment to the specified vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void ApplyTo(
    this Alignment align,
    ref Vector2 vec,
    ref Vector2 size
)

Parameters

align
Type: DualityAlignment
vec
Type: DualityVector2
size
Type: DualityVector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Alignment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsAlignment Class
ApplyTo Overload
Duality Namespace


ExtMethodsAlignment.ApplyTo Method (Alignment, Single, Single, Single, Single)

ExtMethodsAlignmentApplyTo Method (Alignment, Single, Single, Single, Single)
Applies the alignment to the specified vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 ApplyTo(
    this Alignment align,
    float x,
    float y,
    float width,
    float height
)

Parameters

align
Type: DualityAlignment
x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Alignment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsAlignment Class
ApplyTo Overload
Duality Namespace


ExtMethodsAlignment.ApplyTo Method (Alignment, Single, Single, Single, Single)

ExtMethodsAlignmentApplyTo Method (Alignment, Single, Single, Single, Single)
Applies the alignment to the specified vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void ApplyTo(
    this Alignment align,
    ref float x,
    ref float y,
    float width,
    float height
)

Parameters

align
Type: DualityAlignment
x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Alignment. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsAlignment Class
ApplyTo Overload
Duality Namespace


ExtMethodsIEnumerable Class

ExtMethodsIEnumerable Class
Provides extension methods for enumerations.
Inheritance Hierarchy
SystemObject
DualityExtMethodsIEnumerable

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsIEnumerable

The ExtMethodsIEnumerable type exposes the following members.

Methods
Name | Description
ByName | Enumerates all GameObjects that match the specified name.
Children | Enumerates the GameObjects children.
ChildrenDeep | Enumerates the GameObjects children, grandchildren, etc.
FirstByName | Returns the first GameObject that matches the specified name.
GameObject | Enumerates all Components parent GameObjects.
GetComponentsT | Enumerates all GameObjects Components of the specified type.
GetComponentsDeepT | Enumerates all GameObjects (and their childrens) Components of the specified type.
GetComponentsInChildrenT | Enumerates all GameObjects childrens Components of the specified type.
NotNullT | Enumerates objects that aren't null.
RangeT | Enumerates a all objects within a specific index range.
RefT | Converts an enumeration of Resources to an enumeration of content references to it.
Res(IEnumerableIContentRef) | Converts an enumeration of content references to an enumeration of Resources.
ResT(IEnumerableContentRefT) | Converts an enumeration of content references to an enumeration of Resources.
SetEqualT(IEnumerableT, IEnumerableT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
SetEqualT(IEnumerableT, IEnumerableT, IEqualityComparerT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
ShuffleT | Shuffles the specified eumerable.
ToStringT(IEnumerableT, String) | Creates a separated list of the string versions of a set of objects.
ToStringT(IEnumerableT, FuncT, String, String) | Creates a separated list of the string versions of a set of objects.
Transform | Enumerates all GameObjects Transform Components.
Top
See Also

Reference

Duality Namespace


ExtMethodsIEnumerable Methods

ExtMethodsIEnumerable Methods

The ExtMethodsIEnumerable type exposes the following members.

Methods
Name | Description
ByName | Enumerates all GameObjects that match the specified name.
Children | Enumerates the GameObjects children.
ChildrenDeep | Enumerates the GameObjects children, grandchildren, etc.
FirstByName | Returns the first GameObject that matches the specified name.
GameObject | Enumerates all Components parent GameObjects.
GetComponentsT | Enumerates all GameObjects Components of the specified type.
GetComponentsDeepT | Enumerates all GameObjects (and their childrens) Components of the specified type.
GetComponentsInChildrenT | Enumerates all GameObjects childrens Components of the specified type.
NotNullT | Enumerates objects that aren't null.
RangeT | Enumerates a all objects within a specific index range.
RefT | Converts an enumeration of Resources to an enumeration of content references to it.
Res(IEnumerableIContentRef) | Converts an enumeration of content references to an enumeration of Resources.
ResT(IEnumerableContentRefT) | Converts an enumeration of content references to an enumeration of Resources.
SetEqualT(IEnumerableT, IEnumerableT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
SetEqualT(IEnumerableT, IEnumerableT, IEqualityComparerT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
ShuffleT | Shuffles the specified eumerable.
ToStringT(IEnumerableT, String) | Creates a separated list of the string versions of a set of objects.
ToStringT(IEnumerableT, FuncT, String, String) | Creates a separated list of the string versions of a set of objects.
Transform | Enumerates all GameObjects Transform Components.
Top
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.ByName Method

ExtMethodsIEnumerableByName Method
Enumerates all GameObjects that match the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<GameObject> ByName(
    this IEnumerable<GameObject> objEnum,
    string name
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
name
Type: SystemString

Return Value

Type: IEnumerable GameObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.Children Method

ExtMethodsIEnumerableChildren Method
Enumerates the GameObjects children.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<GameObject> Children(
    this IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Return Value

Type: IEnumerable GameObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.ChildrenDeep Method

ExtMethodsIEnumerableChildrenDeep Method
Enumerates the GameObjects children, grandchildren, etc.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<GameObject> ChildrenDeep(
    this IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Return Value

Type: IEnumerable GameObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.FirstByName Method

ExtMethodsIEnumerableFirstByName Method
Returns the first GameObject that matches the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static GameObject FirstByName(
    this IEnumerable<GameObject> objEnum,
    string name
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
name
Type: SystemString

Return Value

Type: GameObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.GameObject Method

ExtMethodsIEnumerableGameObject Method
Enumerates all Components parent GameObjects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<GameObject> GameObject(
    this IEnumerable<Component> compEnum
)

Parameters

compEnum
Type: System.Collections.GenericIEnumerable Component

Return Value

Type: IEnumerable GameObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable Component . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.GetComponents(T) Method

ExtMethodsIEnumerableGetComponentsT Method
Enumerates all GameObjects Components of the specified type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> GetComponents<T>(
    this IEnumerable<GameObject> objEnum
)
where T : class

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.GetComponentsDeep(T) Method

ExtMethodsIEnumerableGetComponentsDeepT Method
Enumerates all GameObjects (and their childrens) Components of the specified type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> GetComponentsDeep<T>(
    this IEnumerable<GameObject> objEnum
)
where T : class

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.GetComponentsInChildren(T) Method

ExtMethodsIEnumerableGetComponentsInChildrenT Method
Enumerates all GameObjects childrens Components of the specified type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> GetComponentsInChildren<T>(
    this IEnumerable<GameObject> objEnum
)
where T : class

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.NotNull(T) Method

ExtMethodsIEnumerableNotNullT Method
Enumerates objects that aren't null.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> NotNull<T>(
    this IEnumerable<T> collection
)
where T : class

Parameters

collection
Type: System.Collections.GenericIEnumerable T
A set of objects.

Type Parameters

T
The type of the incoming objects.

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.Range(T) Method

ExtMethodsIEnumerableRangeT Method
Enumerates a all objects within a specific index range.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> Range<T>(
    this IEnumerable<T> collection,
    int startIndex,
    int length
)

Parameters

collection
Type: System.Collections.GenericIEnumerable T
A set of objects.
startIndex
Type: SystemInt32
Index of the first object to be enumerated.
length
Type: SystemInt32
Number of objects to be enumerated.

Type Parameters

T
The type of the incoming objects.

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.Ref(T) Method

ExtMethodsIEnumerableRefT Method
Converts an enumeration of Resources to an enumeration of content references to it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<ContentRef<T>> Ref<T>(
    this IEnumerable<T> res
)
where T : Resource

Parameters

res
Type: System.Collections.GenericIEnumerable T

Type Parameters

T

Return Value

Type: IEnumerable ContentRef T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.Res Method

ExtMethodsIEnumerableRes Method
Overload List
Name | Description
ResT(IEnumerableContentRefT) | Converts an enumeration of content references to an enumeration of Resources.
Res(IEnumerableIContentRef) | Converts an enumeration of content references to an enumeration of Resources.
Top
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.Res(T) Method (IEnumerable(ContentRef(T)))

ExtMethodsIEnumerableResT Method (IEnumerableContentRefT)
Converts an enumeration of content references to an enumeration of Resources.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> Res<T>(
    this IEnumerable<ContentRef<T>> res
)
where T : Resource

Parameters

res
Type: System.Collections.GenericIEnumerable ContentRef T

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable ContentRef T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Res Overload
Duality Namespace


ExtMethodsIEnumerable.Res Method (IEnumerable(IContentRef))

ExtMethodsIEnumerableRes Method (IEnumerableIContentRef)
Converts an enumeration of content references to an enumeration of Resources.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Resource> Res(
    this IEnumerable<IContentRef> res
)

Parameters

res
Type: System.Collections.GenericIEnumerable IContentRef

Return Value

Type: IEnumerable Resource

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable IContentRef . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Res Overload
Duality Namespace


ExtMethodsIEnumerable.SetEqual Method

ExtMethodsIEnumerableSetEqual Method
Overload List
Name | Description
SetEqualT(IEnumerableT, IEnumerableT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
SetEqualT(IEnumerableT, IEnumerableT, IEqualityComparerT) | Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.
Top
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.SetEqual(T) Method (IEnumerable(T), IEnumerable(T))

ExtMethodsIEnumerableSetEqualT Method (IEnumerableT, IEnumerableT)
Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool SetEqual<T>(
    this IEnumerable<T> first,
    IEnumerable<T> second
)

Parameters

first
Type: System.Collections.GenericIEnumerable T
second
Type: System.Collections.GenericIEnumerable T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
SetEqual Overload
Duality Namespace


ExtMethodsIEnumerable.SetEqual(T) Method (IEnumerable(T), IEnumerable(T), IEqualityComparer(T))

ExtMethodsIEnumerableSetEqualT Method (IEnumerableT, IEnumerableT, IEqualityComparerT)
Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool SetEqual<T>(
    this IEnumerable<T> first,
    IEnumerable<T> second,
    IEqualityComparer<T> comparer
)

Parameters

first
Type: System.Collections.GenericIEnumerable T
second
Type: System.Collections.GenericIEnumerable T
comparer
Type: System.Collections.GenericIEqualityComparer T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
SetEqual Overload
Duality Namespace


ExtMethodsIEnumerable.Shuffle(T) Method

ExtMethodsIEnumerableShuffleT Method
Shuffles the specified eumerable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> Shuffle<T>(
    this IList<T> collection,
    Random rnd = null
)

Parameters

collection
Type: System.Collections.GenericIList T
rnd (Optional)
Type: SystemRandom
The random number generator to use. Defaults to Rnd, if null.

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.ToString Method

ExtMethodsIEnumerableToString Method
Overload List
Name | Description
ToStringT(IEnumerableT, String) | Creates a separated list of the string versions of a set of objects.
ToStringT(IEnumerableT, FuncT, String, String) | Creates a separated list of the string versions of a set of objects.
Top
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIEnumerable.ToString(T) Method (IEnumerable(T), String)

ExtMethodsIEnumerableToStringT Method (IEnumerableT, String)
Creates a separated list of the string versions of a set of objects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string ToString<T>(
    this IEnumerable<T> collection,
    string separator
)

Parameters

collection
Type: System.Collections.GenericIEnumerable T
A set of objects.
separator
Type: SystemString
The string to use as separator between two string values.

Type Parameters

T
The type of the incoming objects.

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
ToString Overload
Duality Namespace


ExtMethodsIEnumerable.ToString(T) Method (IEnumerable(T), Func(T, String), String)

ExtMethodsIEnumerableToStringT Method (IEnumerableT, FuncT, String, String)
Creates a separated list of the string versions of a set of objects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string ToString<T>(
    this IEnumerable<T> collection,
    Func<T, string> toString,
    string separator
)

Parameters

collection
Type: System.Collections.GenericIEnumerable T
A set of objects.
toString
Type: SystemFunc T, String
A function that transforms objects to strings.
separator
Type: SystemString
The string to use as separator between two string values.

Type Parameters

T
The type of the incoming objects.

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
ToString Overload
Duality Namespace


ExtMethodsIEnumerable.Transform Method

ExtMethodsIEnumerableTransform Method
Enumerates all GameObjects Transform Components.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Transform> Transform(
    this IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject

Return Value

Type: IEnumerable Transform

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable GameObject . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIEnumerable Class
Duality Namespace


ExtMethodsIList Class

ExtMethodsIList Class
Provides extension methods for lists.
Inheritance Hierarchy
SystemObject
DualityExtMethodsIList

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsIList

The ExtMethodsIList type exposes the following members.

Methods
Name | Description
BoundingBox | Determines the bounding box of a list of vectors.
GetCombinedHashCode(IListByte, Int32, Int32) | Returns the combined hash code of the specified byte list.
GetCombinedHashCodeT(IListT, Int32, Int32) | Returns the combined hash code of the specified list.
IndexOfFirstT(IListT, PredicateT) | Returns the index of the first object matching the specified predicate.
IndexOfFirstT(IListT, T) | Returns the index of the first object matching the specified one.
IndexOfLastT(IListT, PredicateT) | Returns the index of the last object matching the specified predicate.
IndexOfLastT(IListT, T) | Returns the index of the last object matching the specified one.
StableSortT(IListT) | Performs a stable sort.
StableSortT(IListT, IComparerT) | Performs a stable sort.
StableSortT(IListT, ComparisonT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, IComparerT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, ComparisonT) | Performs a stable sort.
Top
See Also

Reference

Duality Namespace


ExtMethodsIList Methods

ExtMethodsIList Methods

The ExtMethodsIList type exposes the following members.

Methods
Name | Description
BoundingBox | Determines the bounding box of a list of vectors.
GetCombinedHashCode(IListByte, Int32, Int32) | Returns the combined hash code of the specified byte list.
GetCombinedHashCodeT(IListT, Int32, Int32) | Returns the combined hash code of the specified list.
IndexOfFirstT(IListT, PredicateT) | Returns the index of the first object matching the specified predicate.
IndexOfFirstT(IListT, T) | Returns the index of the first object matching the specified one.
IndexOfLastT(IListT, PredicateT) | Returns the index of the last object matching the specified predicate.
IndexOfLastT(IListT, T) | Returns the index of the last object matching the specified one.
StableSortT(IListT) | Performs a stable sort.
StableSortT(IListT, IComparerT) | Performs a stable sort.
StableSortT(IListT, ComparisonT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, IComparerT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, ComparisonT) | Performs a stable sort.
Top
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.BoundingBox Method

ExtMethodsIListBoundingBox Method
Determines the bounding box of a list of vectors.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Rect BoundingBox(
    this IList<Vector2> list
)

Parameters

list
Type: System.Collections.GenericIList Vector2

Return Value

Type: Rect

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList Vector2 . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.GetCombinedHashCode Method

ExtMethodsIListGetCombinedHashCode Method
Overload List
Name | Description
GetCombinedHashCode(IListByte, Int32, Int32) | Returns the combined hash code of the specified byte list.
GetCombinedHashCodeT(IListT, Int32, Int32) | Returns the combined hash code of the specified list.
Top
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.GetCombinedHashCode Method (IList(Byte), Int32, Int32)

ExtMethodsIListGetCombinedHashCode Method (IListByte, Int32, Int32)
Returns the combined hash code of the specified byte list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetCombinedHashCode(
    this IList<byte> list,
    int firstIndex = 0,
    int length = -1
)

Parameters

list
Type: System.Collections.GenericIList Byte
firstIndex (Optional)
Type: SystemInt32
length (Optional)
Type: SystemInt32

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList Byte . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
GetCombinedHashCode Overload
Duality Namespace


ExtMethodsIList.GetCombinedHashCode(T) Method (IList(T), Int32, Int32)

ExtMethodsIListGetCombinedHashCodeT Method (IListT, Int32, Int32)
Returns the combined hash code of the specified list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetCombinedHashCode<T>(
    this IList<T> list,
    int firstIndex = 0,
    int length = -1
)

Parameters

list
Type: System.Collections.GenericIList T
firstIndex (Optional)
Type: SystemInt32
length (Optional)
Type: SystemInt32

Type Parameters

T

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
GetCombinedHashCode Overload
Duality Namespace


ExtMethodsIList.IndexOfFirst Method

ExtMethodsIListIndexOfFirst Method
Overload List
Name | Description
IndexOfFirstT(IListT, PredicateT) | Returns the index of the first object matching the specified predicate.
IndexOfFirstT(IListT, T) | Returns the index of the first object matching the specified one.
Top
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.IndexOfFirst(T) Method (IList(T), Predicate(T))

ExtMethodsIListIndexOfFirstT Method (IListT, PredicateT)
Returns the index of the first object matching the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int IndexOfFirst<T>(
    this IList<T> collection,
    Predicate<T> pred
)

Parameters

collection
Type: System.Collections.GenericIList T
List to perform the sort operation on.
pred
Type: SystemPredicate T
The predicate to use on the lists contents.

Type Parameters

T
The lists object type.

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
IndexOfFirst Overload
Duality Namespace


ExtMethodsIList.IndexOfFirst(T) Method (IList(T), T)

ExtMethodsIListIndexOfFirstT Method (IListT, T)
Returns the index of the first object matching the specified one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int IndexOfFirst<T>(
    this IList<T> collection,
    T val
)

Parameters

collection
Type: System.Collections.GenericIList T
List to perform the sort operation on.
val
Type: T
Object to compare the lists contents to.

Type Parameters

T
The lists object type.

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
IndexOfFirst Overload
Duality Namespace


ExtMethodsIList.IndexOfLast Method

ExtMethodsIListIndexOfLast Method
Overload List
Name | Description
IndexOfLastT(IListT, PredicateT) | Returns the index of the last object matching the specified predicate.
IndexOfLastT(IListT, T) | Returns the index of the last object matching the specified one.
Top
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.IndexOfLast(T) Method (IList(T), Predicate(T))

ExtMethodsIListIndexOfLastT Method (IListT, PredicateT)
Returns the index of the last object matching the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int IndexOfLast<T>(
    this IList<T> collection,
    Predicate<T> pred
)

Parameters

collection
Type: System.Collections.GenericIList T
List to perform the sort operation on.
pred
Type: SystemPredicate T
The predicate to use on the lists contents.

Type Parameters

T
The lists object type.

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
IndexOfLast Overload
Duality Namespace


ExtMethodsIList.IndexOfLast(T) Method (IList(T), T)

ExtMethodsIListIndexOfLastT Method (IListT, T)
Returns the index of the last object matching the specified one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int IndexOfLast<T>(
    this IList<T> collection,
    T val
)

Parameters

collection
Type: System.Collections.GenericIList T
List to perform the sort operation on.
val
Type: T
Object to compare the lists contents to.

Type Parameters

T
The lists object type.

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
IndexOfLast Overload
Duality Namespace


ExtMethodsIList.StableSort Method

ExtMethodsIListStableSort Method
Overload List
Name | Description
StableSortT(IListT) | Performs a stable sort.
StableSortT(IListT, IComparerT) | Performs a stable sort.
StableSortT(IListT, ComparisonT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, IComparerT) | Performs a stable sort.
StableSortT(IListT, Int32, Int32, ComparisonT) | Performs a stable sort.
Top
See Also

Reference

ExtMethodsIList Class
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T))

ExtMethodsIListStableSortT Method (IListT)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T), IComparer(T))

ExtMethodsIListStableSortT Method (IListT, IComparerT)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list,
    IComparer<T> comparer
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.
comparer
Type: System.Collections.GenericIComparer T
The comparer to use.

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T), Comparison(T))

ExtMethodsIListStableSortT Method (IListT, ComparisonT)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list,
    Comparison<T> comparison
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.
comparison
Type: SystemComparison T
The comparison to use.

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T), Int32, Int32)

ExtMethodsIListStableSortT Method (IListT, Int32, Int32)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list,
    int index,
    int count
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.
index
Type: SystemInt32
count
Type: SystemInt32

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T), Int32, Int32, IComparer(T))

ExtMethodsIListStableSortT Method (IListT, Int32, Int32, IComparerT)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list,
    int index,
    int count,
    IComparer<T> comparer
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.
index
Type: SystemInt32
count
Type: SystemInt32
comparer
Type: System.Collections.GenericIComparer T
The comparer to use.

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIList.StableSort(T) Method (IList(T), Int32, Int32, Comparison(T))

ExtMethodsIListStableSortT Method (IListT, Int32, Int32, ComparisonT)
Performs a stable sort.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void StableSort<T>(
    this IList<T> list,
    int index,
    int count,
    Comparison<T> comparison
)

Parameters

list
Type: System.Collections.GenericIList T
List to perform the sort operation on.
index
Type: SystemInt32
count
Type: SystemInt32
comparison
Type: SystemComparison T
The comparison to use.

Type Parameters

T
The lists object type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IList T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIList Class
StableSort Overload
Duality Namespace


ExtMethodsIManageableObject Class

ExtMethodsIManageableObject Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsIManageableObject

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsIManageableObject

The ExtMethodsIManageableObject type exposes the following members.

Methods
Name | Description
DisposeLater | Schedules this object for disposal at the end of the current update cycle.
Top
See Also

Reference

Duality Namespace


ExtMethodsIManageableObject Methods

ExtMethodsIManageableObject Methods

The ExtMethodsIManageableObject type exposes the following members.

Methods
Name | Description
DisposeLater | Schedules this object for disposal at the end of the current update cycle.
Top
See Also

Reference

ExtMethodsIManageableObject Class
Duality Namespace


ExtMethodsIManageableObject.DisposeLater Method

ExtMethodsIManageableObjectDisposeLater Method
Schedules this object for disposal at the end of the current update cycle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void DisposeLater(
    this IManageableObject obj
)

Parameters

obj
Type: DualityIManageableObject

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IManageableObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIManageableObject Class
Duality Namespace


ExtMethodsInitState Class

ExtMethodsInitState Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsInitState

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsInitState

The ExtMethodsInitState type exposes the following members.

Methods
Name | Description
IsActive | Returns whether the current InitState can be considered active. This is true after initialization and during disposal.
Top
See Also

Reference

Duality Namespace


ExtMethodsInitState Methods

ExtMethodsInitState Methods

The ExtMethodsInitState type exposes the following members.

Methods
Name | Description
IsActive | Returns whether the current InitState can be considered active. This is true after initialization and during disposal.
Top
See Also

Reference

ExtMethodsInitState Class
Duality Namespace


ExtMethodsInitState.IsActive Method

ExtMethodsInitStateIsActive Method
Returns whether the current InitState can be considered active. This is true after initialization and during disposal.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsActive(
    this InitState state
)

Parameters

state
Type: DualityInitState

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type InitState. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsInitState Class
Duality Namespace


ExtMethodsMemberInfo Class

ExtMethodsMemberInfo Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsMemberInfo

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsMemberInfo

The ExtMethodsMemberInfo type exposes the following members.

Methods
Name | Description
IsEquivalent | Determines whether two MemberInfo instances refer to the same member, regardless of the context in which each instance was obtained.
Top
See Also

Reference

Duality Namespace


ExtMethodsMemberInfo Methods

ExtMethodsMemberInfo Methods

The ExtMethodsMemberInfo type exposes the following members.

Methods
Name | Description
IsEquivalent | Determines whether two MemberInfo instances refer to the same member, regardless of the context in which each instance was obtained.
Top
See Also

Reference

ExtMethodsMemberInfo Class
Duality Namespace


ExtMethodsMemberInfo.IsEquivalent Method

ExtMethodsMemberInfoIsEquivalent Method
Determines whether two MemberInfo instances refer to the same member, regardless of the context in which each instance was obtained.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsEquivalent(
    this MemberInfo first,
    MemberInfo second
)

Parameters

first
Type: System.ReflectionMemberInfo
second
Type: System.ReflectionMemberInfo

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MemberInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsMemberInfo Class
Duality Namespace


ExtMethodsPropertyInfo Class

ExtMethodsPropertyInfo Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsPropertyInfo

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsPropertyInfo

The ExtMethodsPropertyInfo type exposes the following members.

Methods
Name | Description
IsPublic |
IsStatic |
Top
See Also

Reference

Duality Namespace


ExtMethodsPropertyInfo Methods

ExtMethodsPropertyInfo Methods

The ExtMethodsPropertyInfo type exposes the following members.

Methods
Name | Description
IsPublic |
IsStatic |
Top
See Also

Reference

ExtMethodsPropertyInfo Class
Duality Namespace


ExtMethodsPropertyInfo.IsPublic Method

ExtMethodsPropertyInfoIsPublic Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsPublic(
    this PropertyInfo property
)

Parameters

property
Type: System.ReflectionPropertyInfo

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PropertyInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsPropertyInfo Class
Duality Namespace


ExtMethodsPropertyInfo.IsStatic Method

ExtMethodsPropertyInfoIsStatic Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsStatic(
    this PropertyInfo property
)

Parameters

property
Type: System.ReflectionPropertyInfo

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PropertyInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsPropertyInfo Class
Duality Namespace


ExtMethodsRandom Class

ExtMethodsRandom Class
Provides extension methods for random number generators.
Inheritance Hierarchy
SystemObject
DualityExtMethodsRandom

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsRandom

The ExtMethodsRandom type exposes the following members.

Methods
Name | Description
NextBool | Returns a random bool.
NextByte(Random) | Returns a random byte.
NextByte(Random, Byte) | Returns a random byte.
NextByte(Random, Byte, Byte) | Returns a random byte.
NextColorHsva(Random) | Returns a random ColorHsva with full saturation and maximum brightness.
NextColorHsva(Random, ColorHsva, ColorHsva) | Returns a component-wise random ColorHsva.
NextColorRgba(Random) | Returns a random ColorRgba with full saturation and maximum brightness.
NextColorRgba(Random, ColorRgba, ColorRgba) | Returns a component-wise random ColorRgba.
NextFloat(Random) | Returns a random float.
NextFloat(Random, Single) | Returns a random float.
NextFloat(Random, Single, Single) | Returns a random float.
NextVector2(Random) | Returns a random Vector2 with length one.
NextVector2(Random, Rect) | Returns a random Vector2 pointing to a position inside the specified rect.
NextVector2(Random, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single, Single, Single) | Returns a random Vector2 pointing to a position inside the specified rect.
NextVector3(Random) | Returns a random Vector3 with length one.
NextVector3(Random, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single, Single, Single, Single, Single) | Returns a random Vector3 pointing to a position inside the specified cube.
OneOfT | Returns one randomly selected element.
OneOfWeightedT(Random, IEnumerableKeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, KeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, IEnumerableSingle) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, FuncT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, Single) | Returns a random value from a weighted value pool.
Top
See Also

Reference

Duality Namespace


ExtMethodsRandom Methods

ExtMethodsRandom Methods

The ExtMethodsRandom type exposes the following members.

Methods
Name | Description
NextBool | Returns a random bool.
NextByte(Random) | Returns a random byte.
NextByte(Random, Byte) | Returns a random byte.
NextByte(Random, Byte, Byte) | Returns a random byte.
NextColorHsva(Random) | Returns a random ColorHsva with full saturation and maximum brightness.
NextColorHsva(Random, ColorHsva, ColorHsva) | Returns a component-wise random ColorHsva.
NextColorRgba(Random) | Returns a random ColorRgba with full saturation and maximum brightness.
NextColorRgba(Random, ColorRgba, ColorRgba) | Returns a component-wise random ColorRgba.
NextFloat(Random) | Returns a random float.
NextFloat(Random, Single) | Returns a random float.
NextFloat(Random, Single, Single) | Returns a random float.
NextVector2(Random) | Returns a random Vector2 with length one.
NextVector2(Random, Rect) | Returns a random Vector2 pointing to a position inside the specified rect.
NextVector2(Random, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single, Single, Single) | Returns a random Vector2 pointing to a position inside the specified rect.
NextVector3(Random) | Returns a random Vector3 with length one.
NextVector3(Random, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single, Single, Single, Single, Single) | Returns a random Vector3 pointing to a position inside the specified cube.
OneOfT | Returns one randomly selected element.
OneOfWeightedT(Random, IEnumerableKeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, KeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, IEnumerableSingle) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, FuncT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, Single) | Returns a random value from a weighted value pool.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextBool Method

ExtMethodsRandomNextBool Method
Returns a random bool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool NextBool(
    this Random r
)

Parameters

r
Type: SystemRandom
A random number generator.

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextByte Method

ExtMethodsRandomNextByte Method
Overload List
Name | Description
NextByte(Random) | Returns a random byte.
NextByte(Random, Byte) | Returns a random byte.
NextByte(Random, Byte, Byte) | Returns a random byte.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextByte Method (Random)

ExtMethodsRandomNextByte Method (Random)
Returns a random byte.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static byte NextByte(
    this Random r
)

Parameters

r
Type: SystemRandom
A random number generator.

Return Value

Type: Byte

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextByte Overload
Duality Namespace


ExtMethodsRandom.NextByte Method (Random, Byte)

ExtMethodsRandomNextByte Method (Random, Byte)
Returns a random byte.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static byte NextByte(
    this Random r,
    byte max
)

Parameters

r
Type: SystemRandom
A random number generator.
max
Type: SystemByte
Exclusive maximum value.

Return Value

Type: Byte

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextByte Overload
Duality Namespace


ExtMethodsRandom.NextByte Method (Random, Byte, Byte)

ExtMethodsRandomNextByte Method (Random, Byte, Byte)
Returns a random byte.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static byte NextByte(
    this Random r,
    byte min,
    byte max
)

Parameters

r
Type: SystemRandom
A random number generator.
min
Type: SystemByte
Inclusive minimum value.
max
Type: SystemByte
Exclusive maximum value.

Return Value

Type: Byte

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextByte Overload
Duality Namespace


ExtMethodsRandom.NextColorHsva Method

ExtMethodsRandomNextColorHsva Method
Overload List
Name | Description
NextColorHsva(Random) | Returns a random ColorHsva with full saturation and maximum brightness.
NextColorHsva(Random, ColorHsva, ColorHsva) | Returns a component-wise random ColorHsva.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextColorHsva Method (Random)

ExtMethodsRandomNextColorHsva Method (Random)
Returns a random ColorHsva with full saturation and maximum brightness.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ColorHsva NextColorHsva(
    this Random r
)

Parameters

r
Type: SystemRandom

Return Value

Type: ColorHsva

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextColorHsva Overload
Duality Namespace


ExtMethodsRandom.NextColorHsva Method (Random, ColorHsva, ColorHsva)

ExtMethodsRandomNextColorHsva Method (Random, ColorHsva, ColorHsva)
Returns a component-wise random ColorHsva.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ColorHsva NextColorHsva(
    this Random r,
    ColorHsva min,
    ColorHsva max
)

Parameters

r
Type: SystemRandom
min
Type: Duality.DrawingColorHsva
max
Type: Duality.DrawingColorHsva

Return Value

Type: ColorHsva

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextColorHsva Overload
Duality Namespace


ExtMethodsRandom.NextColorRgba Method

ExtMethodsRandomNextColorRgba Method
Overload List
Name | Description
NextColorRgba(Random) | Returns a random ColorRgba with full saturation and maximum brightness.
NextColorRgba(Random, ColorRgba, ColorRgba) | Returns a component-wise random ColorRgba.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextColorRgba Method (Random)

ExtMethodsRandomNextColorRgba Method (Random)
Returns a random ColorRgba with full saturation and maximum brightness.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ColorRgba NextColorRgba(
    this Random r
)

Parameters

r
Type: SystemRandom

Return Value

Type: ColorRgba

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextColorRgba Overload
Duality Namespace


ExtMethodsRandom.NextColorRgba Method (Random, ColorRgba, ColorRgba)

ExtMethodsRandomNextColorRgba Method (Random, ColorRgba, ColorRgba)
Returns a component-wise random ColorRgba.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ColorRgba NextColorRgba(
    this Random r,
    ColorRgba min,
    ColorRgba max
)

Parameters

r
Type: SystemRandom
min
Type: Duality.DrawingColorRgba
max
Type: Duality.DrawingColorRgba

Return Value

Type: ColorRgba

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextColorRgba Overload
Duality Namespace


ExtMethodsRandom.NextFloat Method

ExtMethodsRandomNextFloat Method
Overload List
Name | Description
NextFloat(Random) | Returns a random float.
NextFloat(Random, Single) | Returns a random float.
NextFloat(Random, Single, Single) | Returns a random float.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextFloat Method (Random)

ExtMethodsRandomNextFloat Method (Random)
Returns a random float.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float NextFloat(
    this Random r
)

Parameters

r
Type: SystemRandom
A random number generator.

Return Value

Type: Single

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextFloat Overload
Duality Namespace


ExtMethodsRandom.NextFloat Method (Random, Single)

ExtMethodsRandomNextFloat Method (Random, Single)
Returns a random float.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float NextFloat(
    this Random r,
    float max
)

Parameters

r
Type: SystemRandom
A random number generator.
max
Type: SystemSingle
Exclusive maximum value.

Return Value

Type: Single

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextFloat Overload
Duality Namespace


ExtMethodsRandom.NextFloat Method (Random, Single, Single)

ExtMethodsRandomNextFloat Method (Random, Single, Single)
Returns a random float.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float NextFloat(
    this Random r,
    float min,
    float max
)

Parameters

r
Type: SystemRandom
A random number generator.
min
Type: SystemSingle
Inclusive minimum value.
max
Type: SystemSingle
Exclusive maximum value.

Return Value

Type: Single

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextFloat Overload
Duality Namespace


ExtMethodsRandom.NextVector2 Method

ExtMethodsRandomNextVector2 Method
Overload List
Name | Description
NextVector2(Random) | Returns a random Vector2 with length one.
NextVector2(Random, Rect) | Returns a random Vector2 pointing to a position inside the specified rect.
NextVector2(Random, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single) | Returns a random Vector2.
NextVector2(Random, Single, Single, Single, Single) | Returns a random Vector2 pointing to a position inside the specified rect.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextVector2 Method (Random)

ExtMethodsRandomNextVector2 Method (Random)
Returns a random Vector2 with length one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 NextVector2(
    this Random r
)

Parameters

r
Type: SystemRandom
A random number generator.

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector2 Overload
Duality Namespace


ExtMethodsRandom.NextVector2 Method (Random, Rect)

ExtMethodsRandomNextVector2 Method (Random, Rect)
Returns a random Vector2 pointing to a position inside the specified rect.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 NextVector2(
    this Random r,
    Rect rect
)

Parameters

r
Type: SystemRandom
A random number generator.
rect
Type: DualityRect
Rectangle that contains the random vector.

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector2 Overload
Duality Namespace


ExtMethodsRandom.NextVector2 Method (Random, Single)

ExtMethodsRandomNextVector2 Method (Random, Single)
Returns a random Vector2.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 NextVector2(
    this Random r,
    float radius
)

Parameters

r
Type: SystemRandom
A random number generator.
radius
Type: SystemSingle
Length of the vector.

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector2 Overload
Duality Namespace


ExtMethodsRandom.NextVector2 Method (Random, Single, Single)

ExtMethodsRandomNextVector2 Method (Random, Single, Single)
Returns a random Vector2.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 NextVector2(
    this Random r,
    float minRadius,
    float maxRadius
)

Parameters

r
Type: SystemRandom
A random number generator.
minRadius
Type: SystemSingle
Minimum length of the vector
maxRadius
Type: SystemSingle
Maximum length of the vector

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector2 Overload
Duality Namespace


ExtMethodsRandom.NextVector2 Method (Random, Single, Single, Single, Single)

ExtMethodsRandomNextVector2 Method (Random, Single, Single, Single, Single)
Returns a random Vector2 pointing to a position inside the specified rect.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector2 NextVector2(
    this Random r,
    float x,
    float y,
    float w,
    float h
)

Parameters

r
Type: SystemRandom
A random number generator.
x
Type: SystemSingle
Rectangle that contains the random vector.
y
Type: SystemSingle
Rectangle that contains the random vector.
w
Type: SystemSingle
Rectangle that contains the random vector.
h
Type: SystemSingle
Rectangle that contains the random vector.

Return Value

Type: Vector2

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector2 Overload
Duality Namespace


ExtMethodsRandom.NextVector3 Method

ExtMethodsRandomNextVector3 Method
Overload List
Name | Description
NextVector3(Random) | Returns a random Vector3 with length one.
NextVector3(Random, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single) | Returns a random Vector3.
NextVector3(Random, Single, Single, Single, Single, Single, Single) | Returns a random Vector3 pointing to a position inside the specified cube.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.NextVector3 Method (Random)

ExtMethodsRandomNextVector3 Method (Random)
Returns a random Vector3 with length one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector3 NextVector3(
    this Random r
)

Parameters

r
Type: SystemRandom
A random number generator.

Return Value

Type: Vector3

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector3 Overload
Duality Namespace


ExtMethodsRandom.NextVector3 Method (Random, Single)

ExtMethodsRandomNextVector3 Method (Random, Single)
Returns a random Vector3.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector3 NextVector3(
    this Random r,
    float radius
)

Parameters

r
Type: SystemRandom
A random number generator.
radius
Type: SystemSingle
Maximum length of the vector.

Return Value

Type: Vector3

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector3 Overload
Duality Namespace


ExtMethodsRandom.NextVector3 Method (Random, Single, Single)

ExtMethodsRandomNextVector3 Method (Random, Single, Single)
Returns a random Vector3.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector3 NextVector3(
    this Random r,
    float minRadius,
    float maxRadius
)

Parameters

r
Type: SystemRandom
A random number generator.
minRadius
Type: SystemSingle
Minimum length of the vector
maxRadius
Type: SystemSingle
Maximum length of the vector

Return Value

Type: Vector3

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector3 Overload
Duality Namespace


ExtMethodsRandom.NextVector3 Method (Random, Single, Single, Single, Single, Single, Single)

ExtMethodsRandomNextVector3 Method (Random, Single, Single, Single, Single, Single, Single)
Returns a random Vector3 pointing to a position inside the specified cube.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Vector3 NextVector3(
    this Random r,
    float x,
    float y,
    float z,
    float w,
    float h,
    float d
)

Parameters

r
Type: SystemRandom
A random number generator.
x
Type: SystemSingle
Cube that contains the random vector.
y
Type: SystemSingle
Cube that contains the random vector.
z
Type: SystemSingle
w
Type: SystemSingle
Cube that contains the random vector.
h
Type: SystemSingle
Cube that contains the random vector.
d
Type: SystemSingle

Return Value

Type: Vector3

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
NextVector3 Overload
Duality Namespace


ExtMethodsRandom.OneOf(T) Method

ExtMethodsRandomOneOfT Method
Returns one randomly selected element.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOf<T>(
    this Random r,
    IEnumerable<T> values
)

Parameters

r
Type: SystemRandom
values
Type: System.Collections.GenericIEnumerable T

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.OneOfWeighted Method

ExtMethodsRandomOneOfWeighted Method
Overload List
Name | Description
OneOfWeightedT(Random, IEnumerableKeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, KeyValuePairT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, IEnumerableSingle) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, FuncT, Single) | Returns a random value from a weighted value pool.
OneOfWeightedT(Random, IEnumerableT, Single) | Returns a random value from a weighted value pool.
Top
See Also

Reference

ExtMethodsRandom Class
Duality Namespace


ExtMethodsRandom.OneOfWeighted(T) Method (Random, IEnumerable(KeyValuePair(T, Single)))

ExtMethodsRandomOneOfWeightedT Method (Random, IEnumerableKeyValuePairT, Single)
Returns a random value from a weighted value pool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOfWeighted<T>(
    this Random r,
    IEnumerable<KeyValuePair<T, float>> weightedValues
)

Parameters

r
Type: SystemRandom
A random number generator.
weightedValues
Type: System.Collections.GenericIEnumerable KeyValuePair T, Single
A weighted value pool.

Type Parameters

T
Type of the random values.

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
OneOfWeighted Overload
Duality Namespace


ExtMethodsRandom.OneOfWeighted(T) Method (Random, KeyValuePair(T, Single)[])

ExtMethodsRandomOneOfWeightedT Method (Random, KeyValuePairT, Single)
Returns a random value from a weighted value pool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOfWeighted<T>(
    this Random r,
    params KeyValuePair<T, float>[] weightedValues
)

Parameters

r
Type: SystemRandom
A random number generator.
weightedValues
Type: System.Collections.GenericKeyValuePair T, Single
A weighted value pool.

Type Parameters

T
Type of the random values.

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
OneOfWeighted Overload
Duality Namespace


ExtMethodsRandom.OneOfWeighted(T) Method (Random, IEnumerable(T), IEnumerable(Single))

ExtMethodsRandomOneOfWeightedT Method (Random, IEnumerableT, IEnumerableSingle)
Returns a random value from a weighted value pool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOfWeighted<T>(
    this Random r,
    IEnumerable<T> values,
    IEnumerable<float> weights
)

Parameters

r
Type: SystemRandom
A random number generator.
values
Type: System.Collections.GenericIEnumerable T
A pool of values.
weights
Type: System.Collections.GenericIEnumerable Single
One weight for each value in the pool.

Type Parameters

T
Type of the random values.

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
OneOfWeighted Overload
Duality Namespace


ExtMethodsRandom.OneOfWeighted(T) Method (Random, IEnumerable(T), Func(T, Single))

ExtMethodsRandomOneOfWeightedT Method (Random, IEnumerableT, FuncT, Single)
Returns a random value from a weighted value pool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOfWeighted<T>(
    this Random r,
    IEnumerable<T> values,
    Func<T, float> weightFunc
)

Parameters

r
Type: SystemRandom
A random number generator.
values
Type: System.Collections.GenericIEnumerable T
A pool of values.
weightFunc
Type: SystemFunc T, Single
A weight function that provides a weight for each value from the pool.

Type Parameters

T
Type of the random values.

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
OneOfWeighted Overload
Duality Namespace


ExtMethodsRandom.OneOfWeighted(T) Method (Random, IEnumerable(T), Single[])

ExtMethodsRandomOneOfWeightedT Method (Random, IEnumerableT, Single)
Returns a random value from a weighted value pool.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T OneOfWeighted<T>(
    this Random r,
    IEnumerable<T> values,
    params float[] weights
)

Parameters

r
Type: SystemRandom
A random number generator.
values
Type: System.Collections.GenericIEnumerable T
A pool of values.
weights
Type: SystemSingle
One weight for each value in the pool.

Type Parameters

T
Type of the random values.

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsRandom Class
OneOfWeighted Overload
Duality Namespace


ExtMethodsString Class

ExtMethodsString Class
Provides extension methods for strings.
Inheritance Hierarchy
SystemObject
DualityExtMethodsString

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsString

The ExtMethodsString type exposes the following members.

Methods
Name | Description
Multiply | Returns a string containing n times the source string.
Top
See Also

Reference

Duality Namespace


ExtMethodsString Methods

ExtMethodsString Methods

The ExtMethodsString type exposes the following members.

Methods
Name | Description
Multiply | Returns a string containing n times the source string.
Top
See Also

Reference

ExtMethodsString Class
Duality Namespace


ExtMethodsString.Multiply Method

ExtMethodsStringMultiply Method
Returns a string containing n times the source string.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Multiply(
    this string source,
    int times
)

Parameters

source
Type: SystemString
times
Type: SystemInt32

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsString Class
Duality Namespace


ExtMethodsTypeInfo Class

ExtMethodsTypeInfo Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsTypeInfo

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsTypeInfo

The ExtMethodsTypeInfo type exposes the following members.

Methods
Name | Description
DeclaredFieldsDeep | Returns all fields that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.
DeclaredMembersDeep | Returns all members that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.
DeclaredPropertiesDeep | Returns all properties that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance properties.
GetBaseTypeInfo | Returns a TypeInfos BaseType as a TypeInfo, or null if it was null.
GetInheritanceDepth | Returns a Types inheritance level. The object-Type has an inheritance level of zero, each subsequent inheritance increases it by one.
IsInstanceOfType | Returns whether the specified object is an instance of the specified TypeInfo.
Top
See Also

Reference

Duality Namespace


ExtMethodsTypeInfo Methods

ExtMethodsTypeInfo Methods

The ExtMethodsTypeInfo type exposes the following members.

Methods
Name | Description
DeclaredFieldsDeep | Returns all fields that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.
DeclaredMembersDeep | Returns all members that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.
DeclaredPropertiesDeep | Returns all properties that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance properties.
GetBaseTypeInfo | Returns a TypeInfos BaseType as a TypeInfo, or null if it was null.
GetInheritanceDepth | Returns a Types inheritance level. The object-Type has an inheritance level of zero, each subsequent inheritance increases it by one.
IsInstanceOfType | Returns whether the specified object is an instance of the specified TypeInfo.
Top
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.DeclaredFieldsDeep Method

ExtMethodsTypeInfoDeclaredFieldsDeep Method
Returns all fields that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<FieldInfo> DeclaredFieldsDeep(
    this TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: IEnumerable FieldInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.DeclaredMembersDeep Method

ExtMethodsTypeInfoDeclaredMembersDeep Method
Returns all members that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance fields.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<MemberInfo> DeclaredMembersDeep(
    this TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: IEnumerable MemberInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.DeclaredPropertiesDeep Method

ExtMethodsTypeInfoDeclaredPropertiesDeep Method
Returns all properties that are declared within this Type, or any of its base Types. Includes public, non-public, static and instance properties.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<PropertyInfo> DeclaredPropertiesDeep(
    this TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: IEnumerable PropertyInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.GetBaseTypeInfo Method

ExtMethodsTypeInfoGetBaseTypeInfo Method
Returns a TypeInfos BaseType as a TypeInfo, or null if it was null.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static TypeInfo GetBaseTypeInfo(
    this TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: TypeInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.GetInheritanceDepth Method

ExtMethodsTypeInfoGetInheritanceDepth Method
Returns a Types inheritance level. The object-Type has an inheritance level of zero, each subsequent inheritance increases it by one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetInheritanceDepth(
    this TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsTypeInfo.IsInstanceOfType Method

ExtMethodsTypeInfoIsInstanceOfType Method
Returns whether the specified object is an instance of the specified TypeInfo.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsInstanceOfType(
    this TypeInfo type,
    Object instance
)

Parameters

type
Type: System.ReflectionTypeInfo
instance
Type: SystemObject

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsTypeInfo Class
Duality Namespace


ExtMethodsVisualLogEntry Class

ExtMethodsVisualLogEntry Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsVisualLogEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsVisualLogEntry

The ExtMethodsVisualLogEntry type exposes the following members.

Methods
Name | Description
Align | Aligns the text of this log entry as specified.
AnchorAtT | Anchors the log entry to the specified GameObject. All coordinates and sizes will be interpreted relative to it. Upon destruction, all anchored log entries will be removed as well.
DontScale(VisualLogCircleEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogPolygonEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogVectorEntry) | Prohibits scale changes due to perspective transformation.
KeepAliveT | Keeps the log entry alive for a certain amount of time. It will fade out smoothly upon nearing its end.
Segment | Instead of a full circle, only a certain angular segment of the circle will be displayed.
WithColorT | Colors the log entry with the specified value.
WithOffsetT | Assigns the log entries depth offset to the specified value.
Top
See Also

Reference

Duality Namespace


ExtMethodsVisualLogEntry Methods

ExtMethodsVisualLogEntry Methods

The ExtMethodsVisualLogEntry type exposes the following members.

Methods
Name | Description
Align | Aligns the text of this log entry as specified.
AnchorAtT | Anchors the log entry to the specified GameObject. All coordinates and sizes will be interpreted relative to it. Upon destruction, all anchored log entries will be removed as well.
DontScale(VisualLogCircleEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogPolygonEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogVectorEntry) | Prohibits scale changes due to perspective transformation.
KeepAliveT | Keeps the log entry alive for a certain amount of time. It will fade out smoothly upon nearing its end.
Segment | Instead of a full circle, only a certain angular segment of the circle will be displayed.
WithColorT | Colors the log entry with the specified value.
WithOffsetT | Assigns the log entries depth offset to the specified value.
Top
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.Align Method

ExtMethodsVisualLogEntryAlign Method
Aligns the text of this log entry as specified.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLogTextEntry Align(
    this VisualLogTextEntry entry,
    Alignment blockAlign
)

Parameters

entry
Type: DualityVisualLogTextEntry
blockAlign
Type: DualityAlignment

Return Value

Type: VisualLogTextEntry

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VisualLogTextEntry. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.AnchorAt(T) Method

ExtMethodsVisualLogEntryAnchorAtT Method
Anchors the log entry to the specified GameObject. All coordinates and sizes will be interpreted relative to it. Upon destruction, all anchored log entries will be removed as well.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T AnchorAt<T>(
    this T entry,
    GameObject obj
)
where T : VisualLogEntry

Parameters

entry
Type: T
obj
Type: DualityGameObject

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.DontScale Method

ExtMethodsVisualLogEntryDontScale Method
Overload List
Name | Description
DontScale(VisualLogCircleEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogPolygonEntry) | Prohibits scale changes due to perspective transformation.
DontScale(VisualLogVectorEntry) | Prohibits scale changes due to perspective transformation.
Top
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.DontScale Method (VisualLogCircleEntry)

ExtMethodsVisualLogEntryDontScale Method (VisualLogCircleEntry)
Prohibits scale changes due to perspective transformation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLogCircleEntry DontScale(
    this VisualLogCircleEntry entry
)

Parameters

entry
Type: DualityVisualLogCircleEntry

Return Value

Type: VisualLogCircleEntry

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VisualLogCircleEntry. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
DontScale Overload
Duality Namespace


ExtMethodsVisualLogEntry.DontScale Method (VisualLogPolygonEntry)

ExtMethodsVisualLogEntryDontScale Method (VisualLogPolygonEntry)
Prohibits scale changes due to perspective transformation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLogPolygonEntry DontScale(
    this VisualLogPolygonEntry entry
)

Parameters

entry
Type: DualityVisualLogPolygonEntry

Return Value

Type: VisualLogPolygonEntry

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VisualLogPolygonEntry. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
DontScale Overload
Duality Namespace


ExtMethodsVisualLogEntry.DontScale Method (VisualLogVectorEntry)

ExtMethodsVisualLogEntryDontScale Method (VisualLogVectorEntry)
Prohibits scale changes due to perspective transformation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLogVectorEntry DontScale(
    this VisualLogVectorEntry entry
)

Parameters

entry
Type: DualityVisualLogVectorEntry

Return Value

Type: VisualLogVectorEntry

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VisualLogVectorEntry. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
DontScale Overload
Duality Namespace


ExtMethodsVisualLogEntry.KeepAlive(T) Method

ExtMethodsVisualLogEntryKeepAliveT Method
Keeps the log entry alive for a certain amount of time. It will fade out smoothly upon nearing its end.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T KeepAlive<T>(
    this T entry,
    float lifetime,
    bool lifetimeAsAlpha = true
)
where T : VisualLogEntry

Parameters

entry
Type: T
lifetime
Type: SystemSingle
The time in milliseconds that will be added to the log entries lifetime.
lifetimeAsAlpha (Optional)
Type: SystemBoolean
Whether the lifetime of this entry should be used as alpha-value of the specified color. If set to true the entry will fade out over time.

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.Segment Method

ExtMethodsVisualLogEntrySegment Method
Instead of a full circle, only a certain angular segment of the circle will be displayed.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLogCircleEntry Segment(
    this VisualLogCircleEntry entry,
    float minAngle,
    float maxAngle
)

Parameters

entry
Type: DualityVisualLogCircleEntry
minAngle
Type: SystemSingle
maxAngle
Type: SystemSingle

Return Value

Type: VisualLogCircleEntry

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VisualLogCircleEntry. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.WithColor(T) Method

ExtMethodsVisualLogEntryWithColorT Method
Colors the log entry with the specified value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T WithColor<T>(
    this T entry,
    ColorRgba color
)
where T : VisualLogEntry

Parameters

entry
Type: T
color
Type: Duality.DrawingColorRgba

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsVisualLogEntry.WithOffset(T) Method

ExtMethodsVisualLogEntryWithOffsetT Method
Assigns the log entries depth offset to the specified value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T WithOffset<T>(
    this T entry,
    float depthOffset
)
where T : VisualLogEntry

Parameters

entry
Type: T
depthOffset
Type: SystemSingle

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVisualLogEntry Class
Duality Namespace


ExtMethodsXml Class

ExtMethodsXml Class
Inheritance Hierarchy
SystemObject
DualityExtMethodsXml

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsXml

The ExtMethodsXml type exposes the following members.

Methods
Name | Description
Ancestors(IEnumerableXContainer, XName, Boolean) |
Ancestors(XNode, XName, Boolean) |
Attributes(IEnumerableXElement, XName, Boolean) |
Attributes(XElement, XName, Boolean) |
Descendants(IEnumerableXContainer, XName, Boolean) |
Descendants(XContainer, XName, Boolean) |
Element |
Elements(IEnumerableXContainer, XName, Boolean) |
Elements(XContainer, XName, Boolean) |
ElementsAfterSelf |
ElementsBeforeSelf |
GetAttributeValue(XElement, XName) |
GetAttributeValueT(XElement, XName, T) |
GetAttributeValueT(XElement, XName, T) |
GetElementValue(XElement, XName) |
GetElementValueT(XElement, XName, T) |
GetElementValueT(XElement, XName, T) |
GetInnerXml |
TryGetAttributeValueT |
TryGetElementValueT |
Top
See Also

Reference

Duality Namespace


ExtMethodsXml Methods

ExtMethodsXml Methods

The ExtMethodsXml type exposes the following members.

Methods
Name | Description
Ancestors(IEnumerableXContainer, XName, Boolean) |
Ancestors(XNode, XName, Boolean) |
Attributes(IEnumerableXElement, XName, Boolean) |
Attributes(XElement, XName, Boolean) |
Descendants(IEnumerableXContainer, XName, Boolean) |
Descendants(XContainer, XName, Boolean) |
Element |
Elements(IEnumerableXContainer, XName, Boolean) |
Elements(XContainer, XName, Boolean) |
ElementsAfterSelf |
ElementsBeforeSelf |
GetAttributeValue(XElement, XName) |
GetAttributeValueT(XElement, XName, T) |
GetAttributeValueT(XElement, XName, T) |
GetElementValue(XElement, XName) |
GetElementValueT(XElement, XName, T) |
GetElementValueT(XElement, XName, T) |
GetInnerXml |
TryGetAttributeValueT |
TryGetElementValueT |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Ancestors Method

ExtMethodsXmlAncestors Method
Overload List
Name | Description
Ancestors(IEnumerableXContainer, XName, Boolean) |
Ancestors(XNode, XName, Boolean) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Ancestors Method (IEnumerable(XContainer), XName, Boolean)

ExtMethodsXmlAncestors Method (IEnumerableXContainer, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Ancestors(
    this IEnumerable<XContainer> nodes,
    XName name,
    bool ignoreNamespace
)

Parameters

nodes
Type: System.Collections.GenericIEnumerable XContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable XContainer . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Ancestors Overload
Duality Namespace


ExtMethodsXml.Ancestors Method (XNode, XName, Boolean)

ExtMethodsXmlAncestors Method (XNode, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Ancestors(
    this XNode node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Xml.LinqXNode
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Ancestors Overload
Duality Namespace


ExtMethodsXml.Attributes Method

ExtMethodsXmlAttributes Method
Overload List
Name | Description
Attributes(IEnumerableXElement, XName, Boolean) |
Attributes(XElement, XName, Boolean) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Attributes Method (IEnumerable(XElement), XName, Boolean)

ExtMethodsXmlAttributes Method (IEnumerableXElement, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XAttribute> Attributes(
    this IEnumerable<XElement> elements,
    XName name,
    bool ignoreNamespace
)

Parameters

elements
Type: System.Collections.GenericIEnumerable XElement
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XAttribute

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable XElement . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Attributes Overload
Duality Namespace


ExtMethodsXml.Attributes Method (XElement, XName, Boolean)

ExtMethodsXmlAttributes Method (XElement, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XAttribute> Attributes(
    this XElement element,
    XName name,
    bool ignoreNamespace
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XAttribute

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Attributes Overload
Duality Namespace


ExtMethodsXml.Descendants Method

ExtMethodsXmlDescendants Method
Overload List
Name | Description
Descendants(IEnumerableXContainer, XName, Boolean) |
Descendants(XContainer, XName, Boolean) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Descendants Method (IEnumerable(XContainer), XName, Boolean)

ExtMethodsXmlDescendants Method (IEnumerableXContainer, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Descendants(
    this IEnumerable<XContainer> container,
    XName name,
    bool ignoreNamespace
)

Parameters

container
Type: System.Collections.GenericIEnumerable XContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable XContainer . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Descendants Overload
Duality Namespace


ExtMethodsXml.Descendants Method (XContainer, XName, Boolean)

ExtMethodsXmlDescendants Method (XContainer, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Descendants(
    this XContainer container,
    XName name,
    bool ignoreNamespace
)

Parameters

container
Type: System.Xml.LinqXContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Descendants Overload
Duality Namespace


ExtMethodsXml.Element Method

ExtMethodsXmlElement Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static XElement Element(
    this XContainer node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Xml.LinqXContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Elements Method

ExtMethodsXmlElements Method
Overload List
Name | Description
Elements(IEnumerableXContainer, XName, Boolean) |
Elements(XContainer, XName, Boolean) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.Elements Method (IEnumerable(XContainer), XName, Boolean)

ExtMethodsXmlElements Method (IEnumerableXContainer, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Elements(
    this IEnumerable<XContainer> node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Collections.GenericIEnumerable XContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable XContainer . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Elements Overload
Duality Namespace


ExtMethodsXml.Elements Method (XContainer, XName, Boolean)

ExtMethodsXmlElements Method (XContainer, XName, Boolean)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> Elements(
    this XContainer node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Xml.LinqXContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Elements Overload
Duality Namespace


ExtMethodsXml.ElementsAfterSelf Method

ExtMethodsXmlElementsAfterSelf Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> ElementsAfterSelf(
    this XContainer node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Xml.LinqXContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.ElementsBeforeSelf Method

ExtMethodsXmlElementsBeforeSelf Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<XElement> ElementsBeforeSelf(
    this XContainer node,
    XName name,
    bool ignoreNamespace
)

Parameters

node
Type: System.Xml.LinqXContainer
name
Type: System.Xml.LinqXName
ignoreNamespace
Type: SystemBoolean

Return Value

Type: IEnumerable XElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.GetAttributeValue Method

ExtMethodsXmlGetAttributeValue Method
Overload List
Name | Description
GetAttributeValue(XElement, XName) |
GetAttributeValueT(XElement, XName, T) |
GetAttributeValueT(XElement, XName, T) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.GetAttributeValue Method (XElement, XName)

ExtMethodsXmlGetAttributeValue Method (XElement, XName)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetAttributeValue(
    this XElement element,
    XName name
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetAttributeValue Overload
Duality Namespace


ExtMethodsXml.GetAttributeValue(T) Method (XElement, XName, T)

ExtMethodsXmlGetAttributeValueT Method (XElement, XName, T)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T GetAttributeValue<T>(
    this XElement element,
    XName name,
    T defaultValue
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
defaultValue
Type: T

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetAttributeValue Overload
Duality Namespace


ExtMethodsXml.GetAttributeValue(T) Method (XElement, XName, T)

ExtMethodsXmlGetAttributeValueT Method (XElement, XName, T)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool GetAttributeValue<T>(
    this XElement element,
    XName name,
    out T target
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
target
Type: T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetAttributeValue Overload
Duality Namespace


ExtMethodsXml.GetElementValue Method

ExtMethodsXmlGetElementValue Method
Overload List
Name | Description
GetElementValue(XElement, XName) |
GetElementValueT(XElement, XName, T) |
GetElementValueT(XElement, XName, T) |
Top
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.GetElementValue Method (XElement, XName)

ExtMethodsXmlGetElementValue Method (XElement, XName)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetElementValue(
    this XElement element,
    XName name
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetElementValue Overload
Duality Namespace


ExtMethodsXml.GetElementValue(T) Method (XElement, XName, T)

ExtMethodsXmlGetElementValueT Method (XElement, XName, T)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T GetElementValue<T>(
    this XElement element,
    XName name,
    T defaultValue
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
defaultValue
Type: T

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetElementValue Overload
Duality Namespace


ExtMethodsXml.GetElementValue(T) Method (XElement, XName, T)

ExtMethodsXmlGetElementValueT Method (XElement, XName, T)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool GetElementValue<T>(
    this XElement element,
    XName name,
    out T target
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
target
Type: T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
GetElementValue Overload
Duality Namespace


ExtMethodsXml.GetInnerXml Method

ExtMethodsXmlGetInnerXml Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetInnerXml(
    this XElement element
)

Parameters

element
Type: System.Xml.LinqXElement

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.TryGetAttributeValue(T) Method

ExtMethodsXmlTryGetAttributeValueT Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool TryGetAttributeValue<T>(
    this XElement element,
    XName name,
    ref T target
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
target
Type: T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


ExtMethodsXml.TryGetElementValue(T) Method

ExtMethodsXmlTryGetElementValueT Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool TryGetElementValue<T>(
    this XElement element,
    XName name,
    ref T target
)

Parameters

element
Type: System.Xml.LinqXElement
name
Type: System.Xml.LinqXName
target
Type: T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsXml Class
Duality Namespace


GameObject Class

GameObject Class
GameObjects are what every Scene consists of. They represent nodes in the hierarchial scene graph and can maintain a PrefabLink connection. A GameObject's main duty is to group several Components to form one logical instance of an actual object as part of the game, such as "Car" or "PlayerCharacter". However, the GameObjects itsself does not contain any game-related logic and, by default, doesn't even occupy a position in space. This is the job of its Components.
Inheritance Hierarchy
SystemObject
DualityGameObject

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class GameObject : IManageableObject,
    IUniqueIdentifyable, ICloneExplicit

The GameObject type exposes the following members.

Constructors
 | Name | Description
Public method | GameObject | Creates a new, empty GameObject.
Public method | GameObject(ContentRefPrefab) | Creates a GameObject based on a specific Prefab.
Public method | GameObject(String, GameObject) | Creates a new, empty GameObject with a specific name.
Top
Methods
 | Name | Description
Public method | AddComponent(Type) | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponentT | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponentT(T) | Adds the specified Component to this GameObject, if no Component of that Type is already part of this GameObject. Simply uses the already added Component otherwise.
Public method | BreakPrefabLink | Breaks this GameObject's PrefabLink
Public method | ChildAtIndex | Returns the child GameObject that is internally stored at the specified index.
 | ChildAtIndexPath | Executes a series of ChildAtIndex(Int32) calls, beginning at this GameObject and each on the last retrieved child object.
Public method | ChildByName | Returns the first child GameObject with the specified name. You may also specify a full name to access children's children.
Public method | ClearComponents | Removes all Components from this GameObject.
Public method | Clone | Creates a deep copy of this GameObject.
Public method | CopyTo | Deep-copies this GameObject's data to the specified target GameObject.
Public method | Dispose | Disposes this GameObject as well as all of its child GameObjects and Components. You usually don't need this - use DisposeLater(IManageableObject) instead.
Public method | GetComponent(Type) | Returns a single Component that matches the specified Type.
Public method | GetComponentT | Returns a single Component that matches the specified Type.
Public method | GetComponents(Type) | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Public method | GetComponentsT | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Public method | GetComponentsDeep(Type) | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Public method | GetComponentsDeepT | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Public method | GetComponentsInChildren(Type) | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Public method | GetComponentsInChildrenT | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Public method | IndexOfChild | Determines the index of a specific child GameObject.
Public method | IndexPathOfChild | Determines the index path from this GameObject to the specified child (or grandchild, etc.) of it.
Public method | IsChildOf | Returns whether this GameObject is a child, grandchild or similar of the specified GameObject.
Public method | IterateChildren | Iterates over all child GameObjects. Unlike iterating manually over Children, this method allows the underlying collection to change while iterating, making it a good candidate for notify operations that may execute code which adds or removed children.
Public method | IterateComponentsT | Iterates over all Components that are instances of Type T. Unlike iterating manually over GetComponentsT, this method allows the underlying collection to change while iterating, making it a good candidate for ICmp notify operations.
Public method | LinkToPrefab | Sets or alters this GameObject's PrefabLink to reference the specified Prefab.
Public method | RemoveComponent(Type) | Removes a Component of the specified Type from this GameObject, if existing.
Public method | RemoveComponent(Component) | Removes a specific Component from this GameObject.
Public method | RemoveComponentT | Removes a Component of the specified Type from this GameObject, if existing.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the GameObject is currently active. To return true, both the GameObject itsself and all of its parent GameObjects need to be active.
Public property | ActiveSingle | [GET / SET] Whether or not the GameObject is currently active. Unlike Active, this property ignores parent activation states and depends only on this single GameObject. The scene graph and other Duality instances usually check Active, not ActiveSingle.
Public property | AffectedByPrefabLink | [GET] The PrefabLink that connects this object or one or its parent GameObjects to a Prefab.
Public property | Children | [GET] Enumerates this objects child GameObjects.
Public property | ChildrenDeep | [GET] Enumerates all GameObjects that are directly or indirectly parented to this object, i.e. its children, grandchildren, etc.
Public property | Disposed | [GET] Returns whether this GameObject has been disposed. Disposed GameObjects are not to be used and should be treated specifically or as null references by your code.
 | FullName | [GET] The path-like hierarchial name of this GameObject.
Public property | Id | [GET] The GameObjects persistent globally unique identifier.
Public property | Name | [GET / SET] The name of this GameObject.
Public property | Parent | [GET / SET] This GameObject's parent object in the scene graph. A GameObject usually depends on its parent in some way, such as being positioned relative to it when occupying a position in space.
Public property | ParentScene | [GET] The GameObjects parent Scene. Each GameObject can belong to exactly one Scene, or no Scene at all. To add or remove GameObjects to / from a Scene, use the AddObject(GameObject) and RemoveObject(GameObject) methods.
Public property | PrefabLink | [GET] The PrefabLink that connects this object to a Prefab.
Public property | Transform | [GET] The GameObject's Transform Component, if existing. This is a cached / faster shortcut-version of GetComponentT.
Top
Events
 | Name | Description
Public event | EventComponentAdded | Fired when a Component has been added to the GameObject
Public event | EventComponentRemoving | Fired when a Component is about to be removed from the GameObject
Public event | EventParentChanged | Fired when this GameObjects parent has changed
Top
See Also

Reference

Duality Namespace
DualityComponent
Duality.ResourcesScene
Duality.ResourcesPrefabLink


GameObject Constructor

GameObject Constructor
Overload List
 | Name | Description
Public method | GameObject | Creates a new, empty GameObject.
Public method | GameObject(ContentRefPrefab) | Creates a GameObject based on a specific Prefab.
Public method | GameObject(String, GameObject) | Creates a new, empty GameObject with a specific name.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject Constructor

GameObject Constructor
Creates a new, empty GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject()
See Also

Reference

GameObject Class
GameObject Overload
Duality Namespace


GameObject Constructor (ContentRef(Prefab))

GameObject Constructor (ContentRefPrefab)
Creates a GameObject based on a specific Prefab.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject(
    ContentRef<Prefab> prefab
)

Parameters

prefab
Type: DualityContentRef Prefab
The Prefab that will be applied to this GameObject.
See Also

Reference

GameObject Class
GameObject Overload
Duality Namespace
Duality.ResourcesPrefab


GameObject Constructor (String, GameObject)

GameObject Constructor (String, GameObject)
Creates a new, empty GameObject with a specific name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject(
    string name,
    GameObject parent = null
)

Parameters

name
Type: SystemString
parent (Optional)
Type: DualityGameObject
See Also

Reference

GameObject Class
GameObject Overload
Duality Namespace


GameObject Methods

GameObject Methods

The GameObject type exposes the following members.

Methods
 | Name | Description
Public method | AddComponent(Type) | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponentT | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponentT(T) | Adds the specified Component to this GameObject, if no Component of that Type is already part of this GameObject. Simply uses the already added Component otherwise.
Public method | BreakPrefabLink | Breaks this GameObject's PrefabLink
Public method | ChildAtIndex | Returns the child GameObject that is internally stored at the specified index.
 | ChildAtIndexPath | Executes a series of ChildAtIndex(Int32) calls, beginning at this GameObject and each on the last retrieved child object.
Public method | ChildByName | Returns the first child GameObject with the specified name. You may also specify a full name to access children's children.
Public method | ClearComponents | Removes all Components from this GameObject.
Public method | Clone | Creates a deep copy of this GameObject.
Public method | CopyTo | Deep-copies this GameObject's data to the specified target GameObject.
Public method | Dispose | Disposes this GameObject as well as all of its child GameObjects and Components. You usually don't need this - use DisposeLater(IManageableObject) instead.
Public method | GetComponent(Type) | Returns a single Component that matches the specified Type.
Public method | GetComponentT | Returns a single Component that matches the specified Type.
Public method | GetComponents(Type) | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Public method | GetComponentsT | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Public method | GetComponentsDeep(Type) | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Public method | GetComponentsDeepT | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Public method | GetComponentsInChildren(Type) | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Public method | GetComponentsInChildrenT | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Public method | IndexOfChild | Determines the index of a specific child GameObject.
Public method | IndexPathOfChild | Determines the index path from this GameObject to the specified child (or grandchild, etc.) of it.
Public method | IsChildOf | Returns whether this GameObject is a child, grandchild or similar of the specified GameObject.
Public method | IterateChildren | Iterates over all child GameObjects. Unlike iterating manually over Children, this method allows the underlying collection to change while iterating, making it a good candidate for notify operations that may execute code which adds or removed children.
Public method | IterateComponentsT | Iterates over all Components that are instances of Type T. Unlike iterating manually over GetComponentsT, this method allows the underlying collection to change while iterating, making it a good candidate for ICmp notify operations.
Public method | LinkToPrefab | Sets or alters this GameObject's PrefabLink to reference the specified Prefab.
Public method | RemoveComponent(Type) | Removes a Component of the specified Type from this GameObject, if existing.
Public method | RemoveComponent(Component) | Removes a specific Component from this GameObject.
Public method | RemoveComponentT | Removes a Component of the specified Type from this GameObject, if existing.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.AddComponent Method

GameObjectAddComponent Method
Overload List
 | Name | Description
Public method | AddComponentT | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponent(Type) | Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.
Public method | AddComponentT(T) | Adds the specified Component to this GameObject, if no Component of that Type is already part of this GameObject. Simply uses the already added Component otherwise.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.AddComponent(T) Method

GameObjectAddComponentT Method
Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T AddComponent<T>()
where T : new(), Component

Type Parameters

T
The Type of which to request a Component instance.

Return Value

Type: T
A reference to a Component of the specified Type.
See Also

Reference

GameObject Class
AddComponent Overload
Duality Namespace
GameObjectAddComponent(Type)


GameObject.AddComponent Method (Type)

GameObjectAddComponent Method (Type)
Adds a Component of the specified Type to this GameObject, if not existing yet. Simply uses the existing Component otherwise.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component AddComponent(
    Type type
)

Parameters

type
Type: SystemType
The Type of which to request a Component instance.

Return Value

Type: Component
A reference to a Component of the specified Type.
See Also

Reference

GameObject Class
AddComponent Overload
Duality Namespace
GameObjectAddComponentT


GameObject.AddComponent(T) Method (T)

GameObjectAddComponentT Method (T)
Adds the specified Component to this GameObject, if no Component of that Type is already part of this GameObject. Simply uses the already added Component otherwise.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T AddComponent<T>(
    T newComp
)
where T : Component

Parameters

newComp
Type: T
The Component instance to add to this GameObject.

Type Parameters

T
The Components Type.

Return Value

Type: T
A reference to a Component of the specified Type
Exceptions
Exception | Condition
ArgumentException | Thrown if the specified Component is already attached to a GameObject
See Also

Reference

GameObject Class
AddComponent Overload
Duality Namespace


GameObject.BreakPrefabLink Method

GameObjectBreakPrefabLink Method
Breaks this GameObject's PrefabLink

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void BreakPrefabLink()
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ChildAtIndex Method

GameObjectChildAtIndex Method
Returns the child GameObject that is internally stored at the specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject ChildAtIndex(
    int index
)

Parameters

index
Type: SystemInt32
The index at which the desired GameObject is located.

Return Value

Type: GameObject
The child GameObject at the specified index. Null, if the index is not valid.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ChildAtIndexPath Method

GameObjectChildAtIndexPath Method
Executes a series of ChildAtIndex(Int32) calls, beginning at this GameObject and each on the last retrieved child object.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject ChildAtIndexPath(
    IEnumerable<int> indexPath
)

Parameters

indexPath
Type: System.Collections.GenericIEnumerable Int32
An enumeration of child indices.

Return Value

Type: GameObject
The last retrieved GameObject after executing all indexing steps.
Examples
Calling ChildAtIndexPath(new[] { 0, 0 }) will return the first child of the first child.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ChildByName Method

GameObjectChildByName Method
Returns the first child GameObject with the specified name. You may also specify a full name to access children's children.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject ChildByName(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: GameObject
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ClearComponents Method

GameObjectClearComponents Method
Removes all Components from this GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearComponents()
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Clone Method

GameObjectClone Method
Creates a deep copy of this GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Clone()

Return Value

Type: GameObject
A reference to a newly created deep copy of this GameObject.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.CopyTo Method

GameObjectCopyTo Method
Deep-copies this GameObject's data to the specified target GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    GameObject target
)

Parameters

target
Type: DualityGameObject
The target GameObject to copy to.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Dispose Method

GameObjectDispose Method
Disposes this GameObject as well as all of its child GameObjects and Components. You usually don't need this - use DisposeLater(IManageableObject) instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IManageableObjectDispose
See Also

Reference

GameObject Class
Duality Namespace
ExtMethodsIManageableObjectDisposeLater(IManageableObject)


GameObject.GetComponent Method

GameObjectGetComponent Method
Overload List
 | Name | Description
Public method | GetComponentT | Returns a single Component that matches the specified Type.
Public method | GetComponent(Type) | Returns a single Component that matches the specified Type.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.GetComponent(T) Method

GameObjectGetComponentT Method
Returns a single Component that matches the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T GetComponent<T>()
where T : class

Type Parameters

T
The Type to match the Components with.

Return Value

Type: T
A single Component that matches the specified Type. Null, if none was found.
See Also

Reference

GameObject Class
GetComponent Overload
Duality Namespace


GameObject.GetComponent Method (Type)

GameObjectGetComponent Method (Type)
Returns a single Component that matches the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component GetComponent(
    Type t
)

Parameters

t
Type: SystemType
The Type to match the Components with.

Return Value

Type: Component
A single Component that matches the specified Type. Null, if none was found.
See Also

Reference

GameObject Class
GetComponent Overload
Duality Namespace
GameObjectGetComponentT


GameObject.GetComponents Method

GameObjectGetComponents Method
Overload List
 | Name | Description
Public method | GetComponentsT | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Public method | GetComponents(Type) | Enumerates all Components of this GameObject that match the specified Type or subclass it.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.GetComponents(T) Method

GameObjectGetComponentsT Method
Enumerates all Components of this GameObject that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> GetComponents<T>()
where T : class

Type Parameters

T
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable T
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponents Overload
Duality Namespace
GameObjectGetComponents(Type)


GameObject.GetComponents Method (Type)

GameObjectGetComponents Method (Type)
Enumerates all Components of this GameObject that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Component> GetComponents(
    Type t
)

Parameters

t
Type: SystemType
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable Component
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponents Overload
Duality Namespace
GameObjectGetComponentsT


GameObject.GetComponentsDeep Method

GameObjectGetComponentsDeep Method
Overload List
 | Name | Description
Public method | GetComponentsDeepT | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Public method | GetComponentsDeep(Type) | Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.GetComponentsDeep(T) Method

GameObjectGetComponentsDeepT Method
Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> GetComponentsDeep<T>()
where T : class

Type Parameters

T
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable T
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponentsDeep Overload
Duality Namespace
GameObjectGetComponentsDeep(Type)


GameObject.GetComponentsDeep Method (Type)

GameObjectGetComponentsDeep Method (Type)
Enumerates all Components of this GameObject or any child GameObject that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Component> GetComponentsDeep(
    Type t
)

Parameters

t
Type: SystemType
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable Component
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponentsDeep Overload
Duality Namespace
GameObjectGetComponentsDeepT


GameObject.GetComponentsInChildren Method

GameObjectGetComponentsInChildren Method
Overload List
 | Name | Description
Public method | GetComponentsInChildrenT | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Public method | GetComponentsInChildren(Type) | Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.GetComponentsInChildren(T) Method

GameObjectGetComponentsInChildrenT Method
Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> GetComponentsInChildren<T>()
where T : class

Type Parameters

T
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable T
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponentsInChildren Overload
Duality Namespace
GameObjectGetComponentsInChildren(Type)


GameObject.GetComponentsInChildren Method (Type)

GameObjectGetComponentsInChildren Method (Type)
Enumerates all Components of this object's child GameObjects that match the specified Type or subclass it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Component> GetComponentsInChildren(
    Type t
)

Parameters

t
Type: SystemType
The base Type to match when iterating through the Components.

Return Value

Type: IEnumerable Component
An enumeration of all Components that match the specified conditions.
See Also

Reference

GameObject Class
GetComponentsInChildren Overload
Duality Namespace
GameObjectGetComponentsInChildrenT


GameObject.IndexOfChild Method

GameObjectIndexOfChild Method
Determines the index of a specific child GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int IndexOfChild(
    GameObject child
)

Parameters

child
Type: DualityGameObject
The child GameObject of which the index is to be determined.

Return Value

Type: Int32
The index of the specified child GameObject
See Also

Reference

GameObject Class
Duality Namespace
GameObjectChildAtIndex(Int32)


GameObject.IndexPathOfChild Method

GameObjectIndexPathOfChild Method
Determines the index path from this GameObject to the specified child (or grandchild, etc.) of it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<int> IndexPathOfChild(
    GameObject child
)

Parameters

child
Type: DualityGameObject
The child GameObject to lead to.

Return Value

Type: List Int32
A ListT of indices that lead from this GameObject to the specified child GameObject.
See Also

Reference

GameObject Class
Duality Namespace
GameObjectChildAtIndexPath(IEnumerableInt32)


GameObject.IsChildOf Method

GameObjectIsChildOf Method
Returns whether this GameObject is a child, grandchild or similar of the specified GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsChildOf(
    GameObject parent
)

Parameters

parent
Type: DualityGameObject
The GameObject to check whether or not it is a parent of this one.

Return Value

Type: Boolean
True, if it is, false if not.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.IterateChildren Method

GameObjectIterateChildren Method
Iterates over all child GameObjects. Unlike iterating manually over Children, this method allows the underlying collection to change while iterating, making it a good candidate for notify operations that may execute code which adds or removed children.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void IterateChildren(
    Action<GameObject> forEach,
    Predicate<GameObject> where = null
)

Parameters

forEach
Type: SystemAction GameObject
The operation that is performed on each child object.
where (Optional)
Type: SystemPredicate GameObject
An optional predicate that needs to return true in order to perform the operation.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.IterateComponents(T) Method

GameObjectIterateComponentsT Method
Iterates over all Components that are instances of Type T. Unlike iterating manually over GetComponentsT, this method allows the underlying collection to change while iterating, making it a good candidate for ICmp notify operations.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void IterateComponents<T>(
    Action<T> forEach,
    Predicate<T> where = null
)
where T : class

Parameters

forEach
Type: SystemAction T
The operation that is performed on each Component.
where (Optional)
Type: SystemPredicate T
An optional predicate that needs to return true in order to perform the operation.

Type Parameters

T
The base Type of Components that are iterated. May be an ICmp interface or similar.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.LinkToPrefab Method

GameObjectLinkToPrefab Method
Sets or alters this GameObject's PrefabLink to reference the specified Prefab.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LinkToPrefab(
    ContentRef<Prefab> prefab
)

Parameters

prefab
Type: DualityContentRef Prefab
The Prefab that will be linked to.
See Also

Reference

GameObject Class
Duality Namespace
Duality.ResourcesPrefabLink
Duality.ResourcesPrefab


GameObject.RemoveComponent Method

GameObjectRemoveComponent Method
Overload List
 | Name | Description
Public method | RemoveComponentT | Removes a Component of the specified Type from this GameObject, if existing.
Public method | RemoveComponent(Type) | Removes a Component of the specified Type from this GameObject, if existing.
Public method | RemoveComponent(Component) | Removes a specific Component from this GameObject.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.RemoveComponent(T) Method

GameObjectRemoveComponentT Method
Removes a Component of the specified Type from this GameObject, if existing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T RemoveComponent<T>()
where T : Component

Type Parameters

T
The Type of which to remove a Component instance.

Return Value

Type: T
A reference to the removed Component. Null otherwise.
See Also

Reference

GameObject Class
RemoveComponent Overload
Duality Namespace
GameObjectRemoveComponent(Type)
GameObjectRemoveComponent(Component)


GameObject.RemoveComponent Method (Type)

GameObjectRemoveComponent Method (Type)
Removes a Component of the specified Type from this GameObject, if existing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component RemoveComponent(
    Type t
)

Parameters

t
Type: SystemType
The Type of which to remove a Component instance.

Return Value

Type: Component
A reference to the removed Component. Null otherwise.
See Also

Reference

GameObject Class
RemoveComponent Overload
Duality Namespace
GameObjectRemoveComponentT
GameObjectRemoveComponent(Component)


GameObject.RemoveComponent Method (Component)

GameObjectRemoveComponent Method (Component)
Removes a specific Component from this GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveComponent(
    Component cmp
)

Parameters

cmp
Type: DualityComponent
The Component to remove from this GameObject
Exceptions
Exception | Condition
ArgumentNullException | Thrown when the specified Component is a null reference.
ArgumentException | Thrown when the specified Component does not belong to this GameObject
See Also

Reference

GameObject Class
RemoveComponent Overload
Duality Namespace
GameObjectRemoveComponent(Type)
GameObjectRemoveComponentT


GameObject.ToString Method

GameObjectToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

GameObject Class
Duality Namespace


GameObject Properties

GameObject Properties

The GameObject type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the GameObject is currently active. To return true, both the GameObject itsself and all of its parent GameObjects need to be active.
Public property | ActiveSingle | [GET / SET] Whether or not the GameObject is currently active. Unlike Active, this property ignores parent activation states and depends only on this single GameObject. The scene graph and other Duality instances usually check Active, not ActiveSingle.
Public property | AffectedByPrefabLink | [GET] The PrefabLink that connects this object or one or its parent GameObjects to a Prefab.
Public property | Children | [GET] Enumerates this objects child GameObjects.
Public property | ChildrenDeep | [GET] Enumerates all GameObjects that are directly or indirectly parented to this object, i.e. its children, grandchildren, etc.
Public property | Disposed | [GET] Returns whether this GameObject has been disposed. Disposed GameObjects are not to be used and should be treated specifically or as null references by your code.
 | FullName | [GET] The path-like hierarchial name of this GameObject.
Public property | Id | [GET] The GameObjects persistent globally unique identifier.
Public property | Name | [GET / SET] The name of this GameObject.
Public property | Parent | [GET / SET] This GameObject's parent object in the scene graph. A GameObject usually depends on its parent in some way, such as being positioned relative to it when occupying a position in space.
Public property | ParentScene | [GET] The GameObjects parent Scene. Each GameObject can belong to exactly one Scene, or no Scene at all. To add or remove GameObjects to / from a Scene, use the AddObject(GameObject) and RemoveObject(GameObject) methods.
Public property | PrefabLink | [GET] The PrefabLink that connects this object to a Prefab.
Public property | Transform | [GET] The GameObject's Transform Component, if existing. This is a cached / faster shortcut-version of GetComponentT.
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Active Property

GameObjectActive Property
[GET / SET] Whether or not the GameObject is currently active. To return true, both the GameObject itsself and all of its parent GameObjects need to be active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Active { get; set; }

Property Value

Type: Boolean

Implements

IManageableObjectActive
See Also

Reference

GameObject Class
Duality Namespace
GameObjectActiveSingle


GameObject.ActiveSingle Property

GameObjectActiveSingle Property
[GET / SET] Whether or not the GameObject is currently active. Unlike Active, this property ignores parent activation states and depends only on this single GameObject. The scene graph and other Duality instances usually check Active, not ActiveSingle.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ActiveSingle { get; set; }

Property Value

Type: Boolean
See Also

Reference

GameObject Class
Duality Namespace
GameObjectActive


GameObject.AffectedByPrefabLink Property

GameObjectAffectedByPrefabLink Property
[GET] The PrefabLink that connects this object or one or its parent GameObjects to a Prefab.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink AffectedByPrefabLink { get; }

Property Value

Type: PrefabLink
Remarks
This does not necessarily mean that this GameObject will be affected by the PrefabLink, since it might not be part of the linked Prefab. It simply indicates the returned PrefabLink's potential to adjust this GameObject when being applied.
See Also

Reference

GameObject Class
Duality Namespace
Duality.ResourcesPrefabLink
Duality.ResourcesPrefab


GameObject.Children Property

GameObjectChildren Property
[GET] Enumerates this objects child GameObjects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> Children { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ChildrenDeep Property

GameObjectChildrenDeep Property
[GET] Enumerates all GameObjects that are directly or indirectly parented to this object, i.e. its children, grandchildren, etc.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> ChildrenDeep { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Disposed Property

GameObjectDisposed Property
[GET] Returns whether this GameObject has been disposed. Disposed GameObjects are not to be used and should be treated specifically or as null references by your code.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean

Implements

IManageableObjectDisposed
See Also

Reference

GameObject Class
Duality Namespace


GameObject.FullName Property

GameObjectFullName Property
[GET] The path-like hierarchial name of this GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FullName { get; }

Property Value

Type: String
Examples
For an object called Wheel inside an object called Car, this would return Car/Wheel.
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Id Property

GameObjectId Property
[GET] The GameObjects persistent globally unique identifier.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Guid Id { get; }

Property Value

Type: Guid
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Name Property

GameObjectName Property
[GET / SET] The name of this GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; set; }

Property Value

Type: String
See Also

Reference

GameObject Class
Duality Namespace


GameObject.Parent Property

GameObjectParent Property
[GET / SET] This GameObject's parent object in the scene graph. A GameObject usually depends on its parent in some way, such as being positioned relative to it when occupying a position in space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Parent { get; set; }

Property Value

Type: GameObject
See Also

Reference

GameObject Class
Duality Namespace


GameObject.ParentScene Property

GameObjectParentScene Property
[GET] The GameObjects parent Scene. Each GameObject can belong to exactly one Scene, or no Scene at all. To add or remove GameObjects to / from a Scene, use the AddObject(GameObject) and RemoveObject(GameObject) methods.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Scene ParentScene { get; }

Property Value

Type: Scene
See Also

Reference

GameObject Class
Duality Namespace


GameObject.PrefabLink Property

GameObjectPrefabLink Property
[GET] The PrefabLink that connects this object to a Prefab.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink PrefabLink { get; }

Property Value

Type: PrefabLink
See Also

Reference

GameObject Class
Duality Namespace
Duality.ResourcesPrefabLink
Duality.ResourcesPrefab


GameObject.Transform Property

GameObjectTransform Property
[GET] The GameObject's Transform Component, if existing. This is a cached / faster shortcut-version of GetComponentT.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Transform Transform { get; }

Property Value

Type: Transform
See Also

Reference

GameObject Class
Duality Namespace
Duality.ComponentsTransform


GameObject Events

GameObject Events

The GameObject type exposes the following members.

Events
 | Name | Description
Public event | EventComponentAdded | Fired when a Component has been added to the GameObject
Public event | EventComponentRemoving | Fired when a Component is about to be removed from the GameObject
Public event | EventParentChanged | Fired when this GameObjects parent has changed
Top
See Also

Reference

GameObject Class
Duality Namespace


GameObject.EventComponentAdded Event

GameObjectEventComponentAdded Event
Fired when a Component has been added to the GameObject

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<ComponentEventArgs> EventComponentAdded

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

GameObject Class
Duality Namespace


GameObject.EventComponentRemoving Event

GameObjectEventComponentRemoving Event
Fired when a Component is about to be removed from the GameObject

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<ComponentEventArgs> EventComponentRemoving

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

GameObject Class
Duality Namespace


GameObject.EventParentChanged Event

GameObjectEventParentChanged Event
Fired when this GameObjects parent has changed

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GameObjectParentChangedEventArgs> EventParentChanged

Value

Type: SystemEventHandler GameObjectParentChangedEventArgs
See Also

Reference

GameObject Class
Duality Namespace


GameObjectEventArgs Class

GameObjectEventArgs Class
Provides event arguments for GameObject-related events.
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityGameObjectEventArgs
DualityGameObjectParentChangedEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GameObjectEventArgs : EventArgs

The GameObjectEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | GameObjectEventArgs | Initializes a new instance of the GameObjectEventArgs class
Top
Properties
 | Name | Description
Public property | Object | [GET] The affected GameObject.
Top
See Also

Reference

Duality Namespace


GameObjectEventArgs Constructor

GameObjectEventArgs Constructor
Initializes a new instance of the GameObjectEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObjectEventArgs(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
See Also

Reference

GameObjectEventArgs Class
Duality Namespace


GameObjectEventArgs Properties

GameObjectEventArgs Properties

The GameObjectEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Object | [GET] The affected GameObject.
Top
See Also

Reference

GameObjectEventArgs Class
Duality Namespace


GameObjectEventArgs.Object Property

GameObjectEventArgsObject Property
[GET] The affected GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Object { get; }

Property Value

Type: GameObject
See Also

Reference

GameObjectEventArgs Class
Duality Namespace


GameObjectManager Class

GameObjectManager Class
Manages a set of GameObject and exposes suitable object enumerations as well as un/registeration events. If a registered object has been disposed, it will be automatically unregistered.
Inheritance Hierarchy
SystemObject
DualityGameObjectManager

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GameObjectManager

The GameObjectManager type exposes the following members.

Constructors
 | Name | Description
Public method | GameObjectManager | Initializes a new instance of the GameObjectManager class
Top
Methods
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects
Public method | Clear | Unregisters all GameObjects.
Public method | Flush | Unregisters all dead / disposed GameObjects
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects
Top
Properties
 | Name | Description
Public property | ActiveObjects | [GET] Enumerates all registered GameObjects that are currently active.
Public property | ActiveRootObjects | [GET] Enumerates all RootObjects that are currently active.
Public property | AllObjects | [GET] Enumerates all registered GameObjects.
Public property | Count | [GET] The number of registered objects.
Public property | RootObjects | [GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.
Top
Events
 | Name | Description
Public event | ComponentAdded | Fired when a Component is added to an already registered GameObject.
Public event | ComponentRemoving | Fired when a Component is removed from an already registered GameObject.
Public event | GameObjectAdded | Fired when a GameObject is registered
Public event | GameObjectRemoved | Fired when a GameObject is unregistered
Public event | ParentChanged | Fired when a registered GameObjects parent has changed
Top
See Also

Reference

Duality Namespace


GameObjectManager Constructor

GameObjectManager Constructor
Initializes a new instance of the GameObjectManager class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObjectManager()
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager Methods

GameObjectManager Methods

The GameObjectManager type exposes the following members.

Methods
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects
Public method | Clear | Unregisters all GameObjects.
Public method | Flush | Unregisters all dead / disposed GameObjects
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects
Top
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.AddObject Method

GameObjectManagerAddObject Method
Overload List
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects
Top
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.AddObject Method (GameObject)

GameObjectManagerAddObject Method (GameObject)
Registers a GameObject and all of its children.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AddObject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject

Return Value

Type: Boolean
See Also

Reference

GameObjectManager Class
AddObject Overload
Duality Namespace


GameObjectManager.AddObject Method (IEnumerable(GameObject))

GameObjectManagerAddObject Method (IEnumerableGameObject)
Registers a set of GameObjects

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddObject(
    IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
See Also

Reference

GameObjectManager Class
AddObject Overload
Duality Namespace


GameObjectManager.Clear Method

GameObjectManagerClear Method
Unregisters all GameObjects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.Flush Method

GameObjectManagerFlush Method
Unregisters all dead / disposed GameObjects

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Flush()
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.RemoveObject Method

GameObjectManagerRemoveObject Method
Overload List
 | Name | Description
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects
Top
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.RemoveObject Method (GameObject)

GameObjectManagerRemoveObject Method (GameObject)
Unregisters a GameObject and all of its children

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RemoveObject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject

Return Value

Type: Boolean
See Also

Reference

GameObjectManager Class
RemoveObject Overload
Duality Namespace


GameObjectManager.RemoveObject Method (IEnumerable(GameObject))

GameObjectManagerRemoveObject Method (IEnumerableGameObject)
Unregisters a set of GameObjects

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveObject(
    IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
See Also

Reference

GameObjectManager Class
RemoveObject Overload
Duality Namespace


GameObjectManager Properties

GameObjectManager Properties

The GameObjectManager type exposes the following members.

Properties
 | Name | Description
Public property | ActiveObjects | [GET] Enumerates all registered GameObjects that are currently active.
Public property | ActiveRootObjects | [GET] Enumerates all RootObjects that are currently active.
Public property | AllObjects | [GET] Enumerates all registered GameObjects.
Public property | Count | [GET] The number of registered objects.
Public property | RootObjects | [GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.
Top
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.ActiveObjects Property

GameObjectManagerActiveObjects Property
[GET] Enumerates all registered GameObjects that are currently active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> ActiveObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.ActiveRootObjects Property

GameObjectManagerActiveRootObjects Property
[GET] Enumerates all RootObjects that are currently active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> ActiveRootObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.AllObjects Property

GameObjectManagerAllObjects Property
[GET] Enumerates all registered GameObjects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> AllObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.Count Property

GameObjectManagerCount Property
[GET] The number of registered objects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.RootObjects Property

GameObjectManagerRootObjects Property
[GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> RootObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager Events

GameObjectManager Events

The GameObjectManager type exposes the following members.

Events
 | Name | Description
Public event | ComponentAdded | Fired when a Component is added to an already registered GameObject.
Public event | ComponentRemoving | Fired when a Component is removed from an already registered GameObject.
Public event | GameObjectAdded | Fired when a GameObject is registered
Public event | GameObjectRemoved | Fired when a GameObject is unregistered
Public event | ParentChanged | Fired when a registered GameObjects parent has changed
Top
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.ComponentAdded Event

GameObjectManagerComponentAdded Event
Fired when a Component is added to an already registered GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<ComponentEventArgs> ComponentAdded

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.ComponentRemoving Event

GameObjectManagerComponentRemoving Event
Fired when a Component is removed from an already registered GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<ComponentEventArgs> ComponentRemoving

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.GameObjectAdded Event

GameObjectManagerGameObjectAdded Event
Fired when a GameObject is registered

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GameObjectEventArgs> GameObjectAdded

Value

Type: SystemEventHandler GameObjectEventArgs
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.GameObjectRemoved Event

GameObjectManagerGameObjectRemoved Event
Fired when a GameObject is unregistered

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GameObjectEventArgs> GameObjectRemoved

Value

Type: SystemEventHandler GameObjectEventArgs
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectManager.ParentChanged Event

GameObjectManagerParentChanged Event
Fired when a registered GameObjects parent has changed

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GameObjectParentChangedEventArgs> ParentChanged

Value

Type: SystemEventHandler GameObjectParentChangedEventArgs
See Also

Reference

GameObjectManager Class
Duality Namespace


GameObjectParentChangedEventArgs Class

GameObjectParentChangedEventArgs Class
Provides event arguments for a GameObjects "Parent changed" events.
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityGameObjectEventArgs
DualityGameObjectParentChangedEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GameObjectParentChangedEventArgs : GameObjectEventArgs

The GameObjectParentChangedEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | GameObjectParentChangedEventArgs | Initializes a new instance of the GameObjectParentChangedEventArgs class
Top
Properties
 | Name | Description
Public property | NewParent | [GET] The GameObjects new parent.
Public property | Object | [GET] The affected GameObject. (Inherited from GameObjectEventArgs.)
Public property | OldParent | [GET] The GameObjects old parent.
Top
See Also

Reference

Duality Namespace


GameObjectParentChangedEventArgs Constructor

GameObjectParentChangedEventArgs Constructor
Initializes a new instance of the GameObjectParentChangedEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObjectParentChangedEventArgs(
    GameObject obj,
    GameObject oldParent,
    GameObject newParent
)

Parameters

obj
Type: DualityGameObject
oldParent
Type: DualityGameObject
newParent
Type: DualityGameObject
See Also

Reference

GameObjectParentChangedEventArgs Class
Duality Namespace


GameObjectParentChangedEventArgs Properties

GameObjectParentChangedEventArgs Properties

The GameObjectParentChangedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | NewParent | [GET] The GameObjects new parent.
Public property | Object | [GET] The affected GameObject. (Inherited from GameObjectEventArgs.)
Public property | OldParent | [GET] The GameObjects old parent.
Top
See Also

Reference

GameObjectParentChangedEventArgs Class
Duality Namespace


GameObjectParentChangedEventArgs.NewParent Property

GameObjectParentChangedEventArgsNewParent Property
[GET] The GameObjects new parent.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject NewParent { get; }

Property Value

Type: GameObject
See Also

Reference

GameObjectParentChangedEventArgs Class
Duality Namespace


GameObjectParentChangedEventArgs.OldParent Property

GameObjectParentChangedEventArgsOldParent Property
[GET] The GameObjects old parent.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject OldParent { get; }

Property Value

Type: GameObject
See Also

Reference

GameObjectParentChangedEventArgs Class
Duality Namespace


GamepadButton Enumeration

GamepadButton Enumeration

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum GamepadButton
Members
Member name | Value | Description
A | 0 |
B | 1 |
X | 2 |
Y | 3 |
DPadLeft | 4 |
DPadRight | 5 |
DPadUp | 6 |
DPadDown | 7 |
LeftShoulder | 8 |
LeftStick | 9 |
RightShoulder | 10 |
RightStick | 11 |
BigButton | 12 |
Back | 13 |
Start | 14 |
Last | 14 |
See Also

Reference

Duality Namespace


GenericOperator Class

GenericOperator Class
Provides math operations for generic types that are dynamically resolved on their first usage.
Inheritance Hierarchy
SystemObject
DualityGenericOperator

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class GenericOperator

The GenericOperator type exposes the following members.

Methods
Name | Description
AbsT | Calculates the absolute (non-negative) value of a generic value.
AddT, U | Adds two generic values.
AndT | Performs a bitwise AND on two generic values.
ConvertT, U | Converts a generic value to a certain type.
DivideT, U | Divides two generic values.
EqualT | Determines whether two generic values are equal.
GreaterThanT | Determines whether one generic value is greater than the other.
GreaterThanOrEqualT | Determines whether one generic value is greater than or equal to the other.
LerpT | Performs a linear interpolation on a two generic values using a blend factor.
LessThanT | Determines whether one generic value is less than the other.
LessThanOrEqualT | Determines whether one generic value is less than or equal to the other.
ModuloT | Calculates the modulo of a generic value.
MultiplyT, U | Multiplies two generic values.
NegateT | Negates a generic value.
NotT | Performs a bitwise NOT on a generic value.
OrT | Performs a bitwise OR on two generic values.
SubtractT, U | Subtracts two generic values.
XorT | Performs a bitwise exclusive OR on two generic values.
Top
See Also

Reference

Duality Namespace


GenericOperator Methods

GenericOperator Methods

The GenericOperator type exposes the following members.

Methods
Name | Description
AbsT | Calculates the absolute (non-negative) value of a generic value.
AddT, U | Adds two generic values.
AndT | Performs a bitwise AND on two generic values.
ConvertT, U | Converts a generic value to a certain type.
DivideT, U | Divides two generic values.
EqualT | Determines whether two generic values are equal.
GreaterThanT | Determines whether one generic value is greater than the other.
GreaterThanOrEqualT | Determines whether one generic value is greater than or equal to the other.
LerpT | Performs a linear interpolation on a two generic values using a blend factor.
LessThanT | Determines whether one generic value is less than the other.
LessThanOrEqualT | Determines whether one generic value is less than or equal to the other.
ModuloT | Calculates the modulo of a generic value.
MultiplyT, U | Multiplies two generic values.
NegateT | Negates a generic value.
NotT | Performs a bitwise NOT on a generic value.
OrT | Performs a bitwise OR on two generic values.
SubtractT, U | Subtracts two generic values.
XorT | Performs a bitwise exclusive OR on two generic values.
Top
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Abs(T) Method

GenericOperatorAbsT Method
Calculates the absolute (non-negative) value of a generic value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Abs<T>(
    T value
)

Parameters

value
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Add(T, U) Method

GenericOperatorAddT, U Method
Adds two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Add<T, U>(
    T first,
    U second
)

Parameters

first
Type: T
second
Type: U

Type Parameters

T
U

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.And(T) Method

GenericOperatorAndT Method
Performs a bitwise AND on two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T And<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Convert(T, U) Method

GenericOperatorConvertT, U Method
Converts a generic value to a certain type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static U Convert<T, U>(
    T value
)

Parameters

value
Type: T

Type Parameters

T
U

Return Value

Type: U
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Divide(T, U) Method

GenericOperatorDivideT, U Method
Divides two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Divide<T, U>(
    T first,
    U second
)

Parameters

first
Type: T
second
Type: U

Type Parameters

T
U

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Equal(T) Method

GenericOperatorEqualT Method
Determines whether two generic values are equal.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool Equal<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.GreaterThan(T) Method

GenericOperatorGreaterThanT Method
Determines whether one generic value is greater than the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool GreaterThan<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.GreaterThanOrEqual(T) Method

GenericOperatorGreaterThanOrEqualT Method
Determines whether one generic value is greater than or equal to the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool GreaterThanOrEqual<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Lerp(T) Method

GenericOperatorLerpT Method
Performs a linear interpolation on a two generic values using a blend factor.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Lerp<T>(
    T first,
    T second,
    float factor
)

Parameters

first
Type: T
second
Type: T
factor
Type: SystemSingle

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.LessThan(T) Method

GenericOperatorLessThanT Method
Determines whether one generic value is less than the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool LessThan<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.LessThanOrEqual(T) Method

GenericOperatorLessThanOrEqualT Method
Determines whether one generic value is less than or equal to the other.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool LessThanOrEqual<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Modulo(T) Method

GenericOperatorModuloT Method
Calculates the modulo of a generic value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Modulo<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Multiply(T, U) Method

GenericOperatorMultiplyT, U Method
Multiplies two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Multiply<T, U>(
    T first,
    U second
)

Parameters

first
Type: T
second
Type: U

Type Parameters

T
U

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Negate(T) Method

GenericOperatorNegateT Method
Negates a generic value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Negate<T>(
    T value
)

Parameters

value
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Not(T) Method

GenericOperatorNotT Method
Performs a bitwise NOT on a generic value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Not<T>(
    T value
)

Parameters

value
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Or(T) Method

GenericOperatorOrT Method
Performs a bitwise OR on two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Or<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Subtract(T, U) Method

GenericOperatorSubtractT, U Method
Subtracts two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Subtract<T, U>(
    T first,
    U second
)

Parameters

first
Type: T
second
Type: U

Type Parameters

T
U

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


GenericOperator.Xor(T) Method

GenericOperatorXorT Method
Performs a bitwise exclusive OR on two generic values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Xor<T>(
    T first,
    T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T

Return Value

Type: T
See Also

Reference

GenericOperator Class
Duality Namespace


Grid(T) Class

GridT Class
Represents two-dimensional grid-aligned data.
Inheritance Hierarchy
SystemObject
DualityGridT

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Grid<T> : IReadOnlyGrid<T>, IEnumerable<T>,
    IEnumerable

Type Parameters

T

The GridT type exposes the following members.

Constructors
 | Name | Description
Public method | GridT | Creates a new, empty grid.
Public method | GridT(GridT) | Creates a copy of the specified grid.
Public method | GridT(Int32, Int32) | Creates a new grid of the specified size.
Public method | GridT(Int32, Int32, T) | Creates a new grid based on the specified raw data array. It will not be copied, but directly used.
Top
Methods
 | Name | Description
Public method | AssumeRect | Resizes the grid and translates its contents, so it assumes the specified rectangular region, relative to its former shape. X and Y values may be negative, to grow the grid on its left or top side.
Public method | Clear | Clears the grid without modifying its size.
Public method | Contains | Determines whether the specified item is contained within this grid.
Public method | CopyTo(T, Int32) | Copies the grids contents to the specified array, line by line.
Public method | CopyToU(GridU, Int32, Int32, Int32, Int32, Int32, Int32, FuncT, U, U) | Copies the grids contents to the specified other grid.
Public method | Fill | Fills a rectangular region of the grid with the specified value.
Public method | Find | Finds an item that matches the specified predicate.
Public method | FindAll | Finds all items that match the specified predicate.
Public method | FindAllIndices | Finds all indices of items that match the specified predicate.
Public method | FindIndex | Finds the index of an item that matches the specified predicate.
Public method | GetContentBoundaries | Determines the boundaries of the grids non-null content.
Public method | GetDataIndex | Determines the raw data index from the specified two-dimensional grid index.
Public method | GetEnumerator |
Public method | GetGridIndex | Determines the two-dimensional grid index from the specified raw data index.
Public method | IndexOf | Determines the index of the specified item.
Public method | Remove | Removes the specified item from the grid.
Public method | RemoveAll | Removes all items from the grid that match the specified criteria.
Public method | Resize | Resizes the grid.
Public method | ResizeClear | Resizes the grid and clears its contents. The fact that the old contents can be discarded allows to perform the resize operation more efficiently.
Public method | ShrinkToFit | Shrinks the grid to match its non-null content boundaries.
Top
Extension Methods
 | Name | Description
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
Properties
 | Name | Description
Public property | Capacity | [GET / SET] The grids total capacity for elements. Equals Width times Height.
Public property | Height | [GET / SET] The grids height. Setting this will perform a resize operation.
Public property | Item | [GET / SET] Accesses a grid element at the specified position.
Public property | RawData | [GET] The underlying raw data of the grid. You shouldn't need to access this in regular usage - it's just there to allow to operate directly on the data block for higher performance on large batch operations.
Public property | Width | [GET / SET] The grids width. Setting this will perform a resize operation.
Top
See Also

Reference

Duality Namespace


Grid(T) Constructor

GridT Constructor
Overload List
 | Name | Description
Public method | GridT | Creates a new, empty grid.
Public method | GridT(GridT) | Creates a copy of the specified grid.
Public method | GridT(Int32, Int32) | Creates a new grid of the specified size.
Public method | GridT(Int32, Int32, T) | Creates a new grid based on the specified raw data array. It will not be copied, but directly used.
Top
See Also

Reference

GridT Class
Duality Namespace


Grid(T) Constructor

GridT Constructor
Creates a new, empty grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Grid()
See Also

Reference

GridT Class
GridT Overload
Duality Namespace


Grid(T) Constructor (Grid(T))

GridT Constructor (GridT)
Creates a copy of the specified grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Grid(
    Grid<T> other
)

Parameters

other
Type: DualityGrid T
See Also

Reference

GridT Class
GridT Overload
Duality Namespace


Grid(T) Constructor (Int32, Int32)

GridT Constructor (Int32, Int32)
Creates a new grid of the specified size.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Grid(
    int width,
    int height
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
See Also

Reference

GridT Class
GridT Overload
Duality Namespace


Grid(T) Constructor (Int32, Int32, T[])

GridT Constructor (Int32, Int32, T)
Creates a new grid based on the specified raw data array. It will not be copied, but directly used.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Grid(
    int width,
    int height,
    T[] wrapAround
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
wrapAround
Type: T
See Also

Reference

GridT Class
GridT Overload
Duality Namespace


Grid(T) Methods

GridT Methods

The GridT generic type exposes the following members.

Methods
 | Name | Description
Public method | AssumeRect | Resizes the grid and translates its contents, so it assumes the specified rectangular region, relative to its former shape. X and Y values may be negative, to grow the grid on its left or top side.
Public method | Clear | Clears the grid without modifying its size.
Public method | Contains | Determines whether the specified item is contained within this grid.
Public method | CopyTo(T, Int32) | Copies the grids contents to the specified array, line by line.
Public method | CopyToU(GridU, Int32, Int32, Int32, Int32, Int32, Int32, FuncT, U, U) | Copies the grids contents to the specified other grid.
Public method | Fill | Fills a rectangular region of the grid with the specified value.
Public method | Find | Finds an item that matches the specified predicate.
Public method | FindAll | Finds all items that match the specified predicate.
Public method | FindAllIndices | Finds all indices of items that match the specified predicate.
Public method | FindIndex | Finds the index of an item that matches the specified predicate.
Public method | GetContentBoundaries | Determines the boundaries of the grids non-null content.
Public method | GetDataIndex | Determines the raw data index from the specified two-dimensional grid index.
Public method | GetEnumerator |
Public method | GetGridIndex | Determines the two-dimensional grid index from the specified raw data index.
Public method | IndexOf | Determines the index of the specified item.
Public method | Remove | Removes the specified item from the grid.
Public method | RemoveAll | Removes all items from the grid that match the specified criteria.
Public method | Resize | Resizes the grid.
Public method | ResizeClear | Resizes the grid and clears its contents. The fact that the old contents can be discarded allows to perform the resize operation more efficiently.
Public method | ShrinkToFit | Shrinks the grid to match its non-null content boundaries.
Top
Extension Methods
 | Name | Description
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
See Also

Reference

GridT Class
Duality Namespace


Grid(T).AssumeRect Method

GridTAssumeRect Method
Resizes the grid and translates its contents, so it assumes the specified rectangular region, relative to its former shape. X and Y values may be negative, to grow the grid on its left or top side.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AssumeRect(
    int x,
    int y,
    int width,
    int height
)

Parameters

x
Type: SystemInt32
y
Type: SystemInt32
width
Type: SystemInt32
height
Type: SystemInt32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Clear Method

GridTClear Method
Clears the grid without modifying its size.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Contains Method

GridTContains Method
Determines whether the specified item is contained within this grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Contains(
    T item
)

Parameters

item
Type: T

Return Value

Type: Boolean
See Also

Reference

GridT Class
Duality Namespace


Grid(T).CopyTo Method

GridTCopyTo Method
Overload List
 | Name | Description
Public method | CopyTo(T, Int32) | Copies the grids contents to the specified array, line by line.
Public method | CopyToU(GridU, Int32, Int32, Int32, Int32, Int32, Int32, FuncT, U, U) | Copies the grids contents to the specified other grid.
Top
See Also

Reference

GridT Class
Duality Namespace


Grid(T).CopyTo Method (T[], Int32)

GridTCopyTo Method (T, Int32)
Copies the grids contents to the specified array, line by line.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    T[] array,
    int arrayIndex
)

Parameters

array
Type: T
arrayIndex
Type: SystemInt32
See Also

Reference

GridT Class
CopyTo Overload
Duality Namespace


Grid(T).CopyTo(U) Method (Grid(U), Int32, Int32, Int32, Int32, Int32, Int32, Func(T, U, U))

GridTCopyToU Method (GridU, Int32, Int32, Int32, Int32, Int32, Int32, FuncT, U, U)
Copies the grids contents to the specified other grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo<U>(
    Grid<U> target,
    int destX = 0,
    int destY = 0,
    int width = -1,
    int height = -1,
    int srcX = 0,
    int srcY = 0,
    Func<T, U, U> selector = null
)

Parameters

target
Type: DualityGrid U
destX (Optional)
Type: SystemInt32
destY (Optional)
Type: SystemInt32
width (Optional)
Type: SystemInt32
height (Optional)
Type: SystemInt32
srcX (Optional)
Type: SystemInt32
srcY (Optional)
Type: SystemInt32
selector (Optional)
Type: SystemFunc T, U, U

Type Parameters

U
See Also

Reference

GridT Class
CopyTo Overload
Duality Namespace


Grid(T).Fill Method

GridTFill Method
Fills a rectangular region of the grid with the specified value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Fill(
    T item,
    int x,
    int y,
    int width,
    int height
)

Parameters

item
Type: T
x
Type: SystemInt32
y
Type: SystemInt32
width
Type: SystemInt32
height
Type: SystemInt32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Find Method

GridTFind Method
Finds an item that matches the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T Find(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: T
See Also

Reference

GridT Class
Duality Namespace


Grid(T).FindAll Method

GridTFindAll Method
Finds all items that match the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> FindAll(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: IEnumerable T
See Also

Reference

GridT Class
Duality Namespace


Grid(T).FindAllIndices Method

GridTFindAllIndices Method
Finds all indices of items that match the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Point2> FindAllIndices(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: IEnumerable Point2
See Also

Reference

GridT Class
Duality Namespace


Grid(T).FindIndex Method

GridTFindIndex Method
Finds the index of an item that matches the specified predicate.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Point2 FindIndex(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: Point2
See Also

Reference

GridT Class
Duality Namespace


Grid(T).GetContentBoundaries Method

GridTGetContentBoundaries Method
Determines the boundaries of the grids non-null content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void GetContentBoundaries(
    out Point2 topLeft,
    out Point2 size
)

Parameters

topLeft
Type: DualityPoint2
size
Type: DualityPoint2

Return Value

Type:
See Also

Reference

GridT Class
Duality Namespace


Grid(T).GetDataIndex Method

GridTGetDataIndex Method
Determines the raw data index from the specified two-dimensional grid index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetDataIndex(
    int gridX,
    int gridY
)

Parameters

gridX
Type: SystemInt32
gridY
Type: SystemInt32

Return Value

Type: Int32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).GetEnumerator Method

GridTGetEnumerator Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerator<T> GetEnumerator()

Return Value

Type: IEnumerator T

Implements

IEnumerableTGetEnumerator
See Also

Reference

GridT Class
Duality Namespace


Grid(T).GetGridIndex Method

GridTGetGridIndex Method
Determines the two-dimensional grid index from the specified raw data index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Point2 GetGridIndex(
    int dataIndex
)

Parameters

dataIndex
Type: SystemInt32

Return Value

Type: Point2
See Also

Reference

GridT Class
Duality Namespace


Grid(T).IndexOf Method

GridTIndexOf Method
Determines the index of the specified item.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Point2 IndexOf(
    T item
)

Parameters

item
Type: T

Return Value

Type: Point2
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Remove Method

GridTRemove Method
Removes the specified item from the grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Remove(
    T item
)

Parameters

item
Type: T

Return Value

Type: Boolean
See Also

Reference

GridT Class
Duality Namespace


Grid(T).RemoveAll Method

GridTRemoveAll Method
Removes all items from the grid that match the specified criteria.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int RemoveAll(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: Int32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Resize Method

GridTResize Method
Resizes the grid.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Resize(
    int newWidth,
    int newHeight,
    Alignment origin = Alignment.TopLeft
)

Parameters

newWidth
Type: SystemInt32
newHeight
Type: SystemInt32
origin (Optional)
Type: DualityAlignment
See Also

Reference

GridT Class
Duality Namespace


Grid(T).ResizeClear Method

GridTResizeClear Method
Resizes the grid and clears its contents. The fact that the old contents can be discarded allows to perform the resize operation more efficiently.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ResizeClear(
    int newWidth,
    int newHeight
)

Parameters

newWidth
Type: SystemInt32
newHeight
Type: SystemInt32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).ShrinkToFit Method

GridTShrinkToFit Method
Shrinks the grid to match its non-null content boundaries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ShrinkToFit(
    GridTShrinkMode mode = GridTShrinkMode.Both
)

Parameters

mode (Optional)
Type: DualityGridTShrinkMode
See Also

Reference

GridT Class
Duality Namespace


Grid(T) Properties

GridT Properties

The GridT generic type exposes the following members.

Properties
 | Name | Description
Public property | Capacity | [GET / SET] The grids total capacity for elements. Equals Width times Height.
Public property | Height | [GET / SET] The grids height. Setting this will perform a resize operation.
Public property | Item | [GET / SET] Accesses a grid element at the specified position.
Public property | RawData | [GET] The underlying raw data of the grid. You shouldn't need to access this in regular usage - it's just there to allow to operate directly on the data block for higher performance on large batch operations.
Public property | Width | [GET / SET] The grids width. Setting this will perform a resize operation.
Top
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Capacity Property

GridTCapacity Property
[GET / SET] The grids total capacity for elements. Equals Width times Height.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Capacity { get; }

Property Value

Type: Int32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Height Property

GridTHeight Property
[GET / SET] The grids height. Setting this will perform a resize operation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; set; }

Property Value

Type: Int32

Implements

IReadOnlyGridTHeight
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Item Property

GridTItem Property
[GET / SET] Accesses a grid element at the specified position.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T this[
    int x,
    int y
] { get; set; }

Parameters

x
Type: SystemInt32
y
Type: SystemInt32

Return Value

Type: T

Implements

IReadOnlyGridTItemInt32, Int32
See Also

Reference

GridT Class
Duality Namespace


Grid(T).RawData Property

GridTRawData Property
[GET] The underlying raw data of the grid. You shouldn't need to access this in regular usage - it's just there to allow to operate directly on the data block for higher performance on large batch operations.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T[] RawData { get; }

Property Value

Type: T
See Also

Reference

GridT Class
Duality Namespace


Grid(T).Width Property

GridTWidth Property
[GET / SET] The grids width. Setting this will perform a resize operation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; set; }

Property Value

Type: Int32

Implements

IReadOnlyGridTWidth
See Also

Reference

GridT Class
Duality Namespace


Grid(T).ShrinkMode Enumeration

GridTShrinkMode Enumeration
Specifies flags on how to shrink a grid to its minimal size.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum ShrinkMode
Members
Member name | Value | Description
None | 0 | Don't shrink the grid at all.
X | 1 | Shrink the grid horizontally.
Y | 2 | Shrink the grid vertically.
Both | 3 | Shrink the grid both horizontally and vertically.
See Also

Reference

Duality Namespace


ICmpCollisionListener Interface

ICmpCollisionListener Interface
Implement this interface in Components that require notification of collision events that occur to the GameObject they belong to.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICmpCollisionListener

The ICmpCollisionListener type exposes the following members.

Methods
 | Name | Description
Public method | OnCollisionBegin | Called whenever the GameObject starts to collide with something.
Public method | OnCollisionEnd | Called whenever the GameObject stops to collide with something.
Public method | OnCollisionSolve | Called each frame after solving a collision with the GameObject.
Top
See Also

Reference

Duality Namespace


ICmpCollisionListener Methods

ICmpCollisionListener Methods

The ICmpCollisionListener type exposes the following members.

Methods
 | Name | Description
Public method | OnCollisionBegin | Called whenever the GameObject starts to collide with something.
Public method | OnCollisionEnd | Called whenever the GameObject stops to collide with something.
Public method | OnCollisionSolve | Called each frame after solving a collision with the GameObject.
Top
See Also

Reference

ICmpCollisionListener Interface
Duality Namespace


ICmpCollisionListener.OnCollisionBegin Method

ICmpCollisionListenerOnCollisionBegin Method
Called whenever the GameObject starts to collide with something.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnCollisionBegin(
    Component sender,
    CollisionEventArgs args
)

Parameters

sender
Type: DualityComponent
args
Type: DualityCollisionEventArgs
See Also

Reference

ICmpCollisionListener Interface
Duality Namespace


ICmpCollisionListener.OnCollisionEnd Method

ICmpCollisionListenerOnCollisionEnd Method
Called whenever the GameObject stops to collide with something.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnCollisionEnd(
    Component sender,
    CollisionEventArgs args
)

Parameters

sender
Type: DualityComponent
args
Type: DualityCollisionEventArgs
See Also

Reference

ICmpCollisionListener Interface
Duality Namespace


ICmpCollisionListener.OnCollisionSolve Method

ICmpCollisionListenerOnCollisionSolve Method
Called each frame after solving a collision with the GameObject.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnCollisionSolve(
    Component sender,
    CollisionEventArgs args
)

Parameters

sender
Type: DualityComponent
args
Type: DualityCollisionEventArgs
See Also

Reference

ICmpCollisionListener Interface
Duality Namespace


ICmpEditorUpdatable Interface

ICmpEditorUpdatable Interface
Implement this interface in Components that require per-frame updates in the editor.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICmpEditorUpdatable

The ICmpEditorUpdatable type exposes the following members.

Methods
 | Name | Description
Public method | OnUpdate | Called once per frame in order to update the Component in the editor.
Top
See Also

Reference

Duality Namespace


ICmpEditorUpdatable Methods

ICmpEditorUpdatable Methods

The ICmpEditorUpdatable type exposes the following members.

Methods
 | Name | Description
Public method | OnUpdate | Called once per frame in order to update the Component in the editor.
Top
See Also

Reference

ICmpEditorUpdatable Interface
Duality Namespace


ICmpEditorUpdatable.OnUpdate Method

ICmpEditorUpdatableOnUpdate Method
Called once per frame in order to update the Component in the editor.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnUpdate()
See Also

Reference

ICmpEditorUpdatable Interface
Duality Namespace


ICmpInitializable Interface

ICmpInitializable Interface
Implement this interface in Components that require specific init and shutdown logic.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICmpInitializable

The ICmpInitializable type exposes the following members.

Methods
 | Name | Description
Public method | OnInit | Called in order to initialize the Component in a specific way.
Public method | OnShutdown | Called in order to shutdown the Component in a specific way.
Top
See Also

Reference

Duality Namespace


ICmpInitializable Methods

ICmpInitializable Methods

The ICmpInitializable type exposes the following members.

Methods
 | Name | Description
Public method | OnInit | Called in order to initialize the Component in a specific way.
Public method | OnShutdown | Called in order to shutdown the Component in a specific way.
Top
See Also

Reference

ICmpInitializable Interface
Duality Namespace


ICmpInitializable.OnInit Method

ICmpInitializableOnInit Method
Called in order to initialize the Component in a specific way.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnInit(
    ComponentInitContext context
)

Parameters

context
Type: DualityComponentInitContext
The kind of initialization that is intended.
See Also

Reference

ICmpInitializable Interface
Duality Namespace


ICmpInitializable.OnShutdown Method

ICmpInitializableOnShutdown Method
Called in order to shutdown the Component in a specific way.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnShutdown(
    ComponentShutdownContext context
)

Parameters

context
Type: DualityComponentShutdownContext
The kind of shutdown that is intended.
See Also

Reference

ICmpInitializable Interface
Duality Namespace


ICmpRenderer Interface

ICmpRenderer Interface
Implement this interface in Components that are considered renderable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICmpRenderer

The ICmpRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Draw | Draws the object.
Public method | IsVisible | Determines whether or not this renderer is visible to the specified IDrawDevice.
Top
Properties
 | Name | Description
Public property | BoundRadius | [GET] The Renderers bounding radius.
Top
See Also

Reference

Duality Namespace


ICmpRenderer Methods

ICmpRenderer Methods

The ICmpRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Draw | Draws the object.
Public method | IsVisible | Determines whether or not this renderer is visible to the specified IDrawDevice.
Top
See Also

Reference

ICmpRenderer Interface
Duality Namespace


ICmpRenderer.Draw Method

ICmpRendererDraw Method
Draws the object.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice
The IDrawDevice to which the object is drawn.
See Also

Reference

ICmpRenderer Interface
Duality Namespace


ICmpRenderer.IsVisible Method

ICmpRendererIsVisible Method
Determines whether or not this renderer is visible to the specified IDrawDevice.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsVisible(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice
The IDrawDevice to which visibility is determined.

Return Value

Type: Boolean
True, if this renderer is visible to the IDrawDevice. False, if not.
See Also

Reference

ICmpRenderer Interface
Duality Namespace


ICmpRenderer Properties

ICmpRenderer Properties

The ICmpRenderer type exposes the following members.

Properties
 | Name | Description
Public property | BoundRadius | [GET] The Renderers bounding radius.
Top
See Also

Reference

ICmpRenderer Interface
Duality Namespace


ICmpRenderer.BoundRadius Property

ICmpRendererBoundRadius Property
[GET] The Renderers bounding radius.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float BoundRadius { get; }

Property Value

Type: Single
See Also

Reference

ICmpRenderer Interface
Duality Namespace


ICmpUpdatable Interface

ICmpUpdatable Interface
Implement this interface in Components that require per-frame updates.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICmpUpdatable

The ICmpUpdatable type exposes the following members.

Methods
 | Name | Description
Public method | OnUpdate | Called once per frame in order to update the Component.
Top
See Also

Reference

Duality Namespace


ICmpUpdatable Methods

ICmpUpdatable Methods

The ICmpUpdatable type exposes the following members.

Methods
 | Name | Description
Public method | OnUpdate | Called once per frame in order to update the Component.
Top
See Also

Reference

ICmpUpdatable Interface
Duality Namespace


ICmpUpdatable.OnUpdate Method

ICmpUpdatableOnUpdate Method
Called once per frame in order to update the Component.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OnUpdate()
See Also

Reference

ICmpUpdatable Interface
Duality Namespace


IContentRef Interface

IContentRef Interface
IContentRef is a general interface for content references of any Resource type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IContentRef

The IContentRef type exposes the following members.

Methods
 | Name | Description
Public method | AsU | Creates a ContentRefT of the specified Type, referencing the same Resource.
Public method | Detach | Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | MakeAvailable | Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef.
Top
Properties
 | Name | Description
Public property | FullName | [GET] The full name of the referenced Resource, including its path but not its file extension
Public property | IsAvailable | [GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.
Public property | IsDefaultContent | [GET] Returns whether the referenced Resource is part of Duality's embedded default content.
Public property | IsExplicitNull | [GET] Returns whether this content reference has been explicitly set to null.
Public property | IsLoaded | [GET] Returns whether the referenced Resource is currently loaded.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the referenced Resource.
Public property | Path | [GET / SET] The path where to look for the Resource, if it is currently unavailable.
Public property | Res | [GET] Returns the actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.
Public property | ResType | [GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.
Public property | ResWeak | [GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.
Top
See Also

Reference

Duality Namespace
DualityResource
DualityContentProvider
DualityContentRefT


IContentRef Methods

IContentRef Methods

The IContentRef type exposes the following members.

Methods
 | Name | Description
Public method | AsU | Creates a ContentRefT of the specified Type, referencing the same Resource.
Public method | Detach | Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | MakeAvailable | Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef.
Top
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.As(U) Method

IContentRefAsU Method
Creates a ContentRefT of the specified Type, referencing the same Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
ContentRef<U> As<U>()
where U : Resource

Type Parameters

U
The Resource Type to create a reference of.

Return Value

Type: ContentRef U
A ContentRefT of the specified Type, referencing the same Resource. Returns a null reference if the Resource is not assignable to the specified Type.
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Detach Method

IContentRefDetach Method
Discards the resolved content reference cache to allow garbage-collecting the Resource without losing its reference. Accessing it will result in reloading the Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Detach()
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Is Method

IContentRefIs Method
Overload List
 | Name | Description
Public method | IsU | Determines if the references Resource's Type is assignable to the specified Type.
Public method | Is(Type) | Determines if the references Resource's Type is assignable to the specified Type.
Top
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Is(U) Method

IContentRefIsU Method
Determines if the references Resource's Type is assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool Is<U>()
where U : Resource

Type Parameters

U
The Resource Type in question.

Return Value

Type: Boolean
True, if the referenced Resource is of the specified Type or subclassing it.
See Also

Reference

IContentRef Interface
Is Overload
Duality Namespace


IContentRef.Is Method (Type)

IContentRefIs Method (Type)
Determines if the references Resource's Type is assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool Is(
    Type resType
)

Parameters

resType
Type: SystemType
The Resource Type in question.

Return Value

Type: Boolean
True, if the referenced Resource is of the specified Type or subclassing it.
See Also

Reference

IContentRef Interface
Is Overload
Duality Namespace


IContentRef.MakeAvailable Method

IContentRefMakeAvailable Method
Loads the associated content as if it was accessed now. You don't usually need to call this method. It is invoked implicitly by trying to access the ContentRef.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void MakeAvailable()
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef Properties

IContentRef Properties

The IContentRef type exposes the following members.

Properties
 | Name | Description
Public property | FullName | [GET] The full name of the referenced Resource, including its path but not its file extension
Public property | IsAvailable | [GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.
Public property | IsDefaultContent | [GET] Returns whether the referenced Resource is part of Duality's embedded default content.
Public property | IsExplicitNull | [GET] Returns whether this content reference has been explicitly set to null.
Public property | IsLoaded | [GET] Returns whether the referenced Resource is currently loaded.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the referenced Resource.
Public property | Path | [GET / SET] The path where to look for the Resource, if it is currently unavailable.
Public property | Res | [GET] Returns the actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.
Public property | ResType | [GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.
Public property | ResWeak | [GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.
Top
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.FullName Property

IContentRefFullName Property
[GET] The full name of the referenced Resource, including its path but not its file extension

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string FullName { get; }

Property Value

Type: String
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.IsAvailable Property

IContentRefIsAvailable Property
[GET] Returns whether this content reference is available in general. This may trigger loading it, if currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsAvailable { get; }

Property Value

Type: Boolean
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.IsDefaultContent Property

IContentRefIsDefaultContent Property
[GET] Returns whether the referenced Resource is part of Duality's embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsDefaultContent { get; }

Property Value

Type: Boolean
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.IsExplicitNull Property

IContentRefIsExplicitNull Property
[GET] Returns whether this content reference has been explicitly set to null.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsExplicitNull { get; }

Property Value

Type: Boolean
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.IsLoaded Property

IContentRefIsLoaded Property
[GET] Returns whether the referenced Resource is currently loaded.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsLoaded { get; }

Property Value

Type: Boolean
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.IsRuntimeResource Property

IContentRefIsRuntimeResource Property
[GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsRuntimeResource { get; }

Property Value

Type: Boolean
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Name Property

IContentRefName Property
[GET] The name of the referenced Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Name { get; }

Property Value

Type: String
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Path Property

IContentRefPath Property
[GET / SET] The path where to look for the Resource, if it is currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Path { get; set; }

Property Value

Type: String
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.Res Property

IContentRefRes Property
[GET] Returns the actual Resource. If currently unavailable, it is loaded and then returned. Because of that, this Property is only null if the references Resource is missing, invalid, or this content reference has been explicitly set to null. Never returns disposed Resources.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Resource Res { get; }

Property Value

Type: Resource
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.ResType Property

IContentRefResType Property
[GET] The Type of the referenced Resource. If currently unavailable, this is determined by the Resource file path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Type ResType { get; }

Property Value

Type: Type
See Also

Reference

IContentRef Interface
Duality Namespace


IContentRef.ResWeak Property

IContentRefResWeak Property
[GET] Returns the current reference to the Resource that is stored locally. No attemp is made to load or reload the Resource if currently unavailable.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Resource ResWeak { get; }

Property Value

Type: Resource
See Also

Reference

IContentRef Interface
Duality Namespace


ILogOutput Interface

ILogOutput Interface
Represents a single Log output and provides actual writing functionality for

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ILogOutput

The ILogOutput type exposes the following members.

Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Top
See Also

Reference

Duality Namespace


ILogOutput Methods

ILogOutput Methods

The ILogOutput type exposes the following members.

Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Top
See Also

Reference

ILogOutput Interface
Duality Namespace


ILogOutput.Write Method

ILogOutputWrite Method
Writes a single message to the output.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Write(
    LogEntry entry
)

Parameters

entry
Type: DualityLogEntry
The new log entry that is to be written to the output.
See Also

Reference

ILogOutput Interface
Duality Namespace


IManageableObject Interface

IManageableObject Interface
Represents an object that can be de/activated and explicitly released / disposed

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IManageableObject

The IManageableObject type exposes the following members.

Methods
 | Name | Description
Public method | Dispose | Disposes the object.
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
Properties
 | Name | Description
Public property | Active | [GET] Returns whether the object is currently active.
Public property | Disposed | [GET] Returns whether the object is considered disposed.
Top
See Also

Reference

Duality Namespace


IManageableObject Methods

IManageableObject Methods

The IManageableObject type exposes the following members.

Methods
 | Name | Description
Public method | Dispose | Disposes the object.
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
See Also

Reference

IManageableObject Interface
Duality Namespace


IManageableObject.Dispose Method

IManageableObjectDispose Method
Disposes the object.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Dispose()
See Also

Reference

IManageableObject Interface
Duality Namespace


IManageableObject Properties

IManageableObject Properties

The IManageableObject type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET] Returns whether the object is currently active.
Public property | Disposed | [GET] Returns whether the object is considered disposed.
Top
See Also

Reference

IManageableObject Interface
Duality Namespace


IManageableObject.Active Property

IManageableObjectActive Property
[GET] Returns whether the object is currently active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool Active { get; }

Property Value

Type: Boolean
See Also

Reference

IManageableObject Interface
Duality Namespace


IManageableObject.Disposed Property

IManageableObjectDisposed Property
[GET] Returns whether the object is considered disposed.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

IManageableObject Interface
Duality Namespace


InitState Enumeration

InitState Enumeration
Describes the state of object activation or disposal.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum InitState
Members
Member name | Value | Description
Initializing | 0 | The object is currently initializing.
Initialized | 1 | The object has been fully initialized and is fully operational.
Disposing | 2 | The object is currently disposing.
Disposed | 3 | The object has been fully disposed and can be considered "dead".
See Also

Reference

Duality Namespace


InMemoryLogOutput Class

InMemoryLogOutput Class
A Log output that stores all log entries in memory.
Inheritance Hierarchy
SystemObject
DualityInMemoryLogOutput

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class InMemoryLogOutput : ILogOutput

The InMemoryLogOutput type exposes the following members.

Constructors
 | Name | Description
Public method | InMemoryLogOutput | Initializes a new instance of the InMemoryLogOutput class
Top
Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Top
Properties
 | Name | Description
Public property | Entries | [GET] Allows to access all log entries that have been received.
Top
See Also

Reference

Duality Namespace


InMemoryLogOutput Constructor

InMemoryLogOutput Constructor
Initializes a new instance of the InMemoryLogOutput class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public InMemoryLogOutput()
See Also

Reference

InMemoryLogOutput Class
Duality Namespace


InMemoryLogOutput Methods

InMemoryLogOutput Methods

The InMemoryLogOutput type exposes the following members.

Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Top
See Also

Reference

InMemoryLogOutput Class
Duality Namespace


InMemoryLogOutput.Write Method

InMemoryLogOutputWrite Method
Writes a single message to the output.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Write(
    LogEntry entry
)

Parameters

entry
Type: DualityLogEntry
The new log entry that is to be written to the output.

Implements

ILogOutputWrite(LogEntry)
See Also

Reference

InMemoryLogOutput Class
Duality Namespace


InMemoryLogOutput Properties

InMemoryLogOutput Properties

The InMemoryLogOutput type exposes the following members.

Properties
 | Name | Description
Public property | Entries | [GET] Allows to access all log entries that have been received.
Top
See Also

Reference

InMemoryLogOutput Class
Duality Namespace


InMemoryLogOutput.Entries Property

InMemoryLogOutputEntries Property
[GET] Allows to access all log entries that have been received.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IReadOnlyList Entries { get; }

Property Value

Type: IReadOnlyListT
See Also

Reference

InMemoryLogOutput Class
Duality Namespace


IReadOnlyGrid(T) Interface

IReadOnlyGridT Interface
Represents a readonly interface for two-dimensional grid-aligned data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IReadOnlyGrid<out T> : IEnumerable<T>,
    IEnumerable

Type Parameters

T

The IReadOnlyGridT type exposes the following members.

Extension Methods
 | Name | Description
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
Properties
 | Name | Description
Public property | Height | [GET] The grids height.
Public property | Item | [GET] Accesses a grid element at the specified position.
Public property | Width | [GET] The grids width.
Top
See Also

Reference

Duality Namespace


IReadOnlyGrid(T) Methods

IReadOnlyGridT Methods

The IReadOnlyGridT generic type exposes the following members.

Extension Methods
 | Name | Description
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
See Also

Reference

IReadOnlyGridT Interface
Duality Namespace


IReadOnlyGrid(T) Properties

IReadOnlyGridT Properties

The IReadOnlyGridT generic type exposes the following members.

Properties
 | Name | Description
Public property | Height | [GET] The grids height.
Public property | Item | [GET] Accesses a grid element at the specified position.
Public property | Width | [GET] The grids width.
Top
See Also

Reference

IReadOnlyGridT Interface
Duality Namespace


IReadOnlyGrid(T).Height Property

IReadOnlyGridTHeight Property
[GET] The grids height.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Height { get; }

Property Value

Type: Int32
See Also

Reference

IReadOnlyGridT Interface
Duality Namespace


IReadOnlyGrid(T).Item Property

IReadOnlyGridTItem Property
[GET] Accesses a grid element at the specified position.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
T this[
    int x,
    int y
] { get; }

Parameters

x
Type: SystemInt32
y
Type: SystemInt32

Return Value

Type: T
See Also

Reference

IReadOnlyGridT Interface
Duality Namespace


IReadOnlyGrid(T).Width Property

IReadOnlyGridTWidth Property
[GET] The grids width.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Width { get; }

Property Value

Type: Int32
See Also

Reference

IReadOnlyGridT Interface
Duality Namespace


Log Class

Log Class
Listens for log entries and writes them to registered ILogOutputs.
Inheritance Hierarchy
SystemObject
DualityLog

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class Log

The Log type exposes the following members.

Constructors
 | Name | Description
Public method | Log(String, ILogOutput) | Creates a new Log.
Public method | Log(String, LogSharedState, ILogOutput) | Creates a new Log.
Top
Methods
 | Name | Description
 | AddGlobalOutput |
Public method | AddOutput | Adds an output to write log entries to.
 | Assembly | Returns a string that can be used for representing a Assembly in log entries.
 | ConstructorInfo | Returns a string that can be used for representing a constructor in log entries.
 | CurrentMethod | Returns a string that can be used for representing the current line and method within a source code file. This method uses caller information attributes on its parameters - omit them in order to let the compiler do its work.
 | EventInfo | Returns a string that can be used for representing an event in log entries.
 | Exception | Returns a string that can be used for representing an exception in log entries. It usually does not include the full call stack and is significantly shorter than an Exceptions ToString method.
 | FieldInfo | Returns a string that can be used for representing a field in log entries.
 | MemberInfo | Returns a string that can be used for representing a(ny) member in log entries.
 | MethodInfo(MethodBase, Boolean) | Returns a string that can be used for representing a method or constructor in log entries.
 | MethodInfo(MethodInfo, Boolean) | Returns a string that can be used for representing a method in log entries.
Public method | PopIndent | Decreases the current log entry indent.
 | PropertyInfo | Returns a string that can be used for representing a property in log entries.
Public method | PushIndent | Increases the current log entry indent.
 | RemoveGlobalOutput |
Public method | RemoveOutput | Removes a certain output.
 | Type(TypeInfo) | Returns a string that can be used for representing a TypeInfo in log entries.
 | Type(Type) | Returns a string that can be used for representing a Type in log entries.
Public method | Write | Writes a new log entry.
Public method | WriteError | Writes a new error log entry.
Public method | WriteWarning | Writes a new warning log entry.
Top
Properties
 | Name | Description
 | Core | [GET] A log for core-related entries. This is normally only used by Duality itsself.
 | Editor | [GET] A log for editor-related entries. This is used by the Duality editor and its plugins.
 | Game | [GET] A log for game-related entries. Use this for logging data from game plugins.
Public property | Indent | [GET] The Log's current indent level.
Public property | Name | [GET] The Log's name
Public property | Outputs | [GET] Enumerates all the output writers of this log.
Public property | Prefix | [GET] The Log's prefix, which is automatically determined by its name.
Top
See Also

Reference

Duality Namespace


Log Constructor

Log Constructor
Overload List
 | Name | Description
Public method | Log(String, ILogOutput) | Creates a new Log.
Public method | Log(String, LogSharedState, ILogOutput) | Creates a new Log.
Top
See Also

Reference

Log Class
Duality Namespace


Log Constructor (String, ILogOutput[])

Log Constructor (String, ILogOutput)
Creates a new Log.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Log(
    string name,
    params ILogOutput[] output
)

Parameters

name
Type: SystemString
The Logs name
output
Type: DualityILogOutput
It will be initially connected to the specified outputs.
See Also

Reference

Log Class
Log Overload
Duality Namespace


Log Constructor (String, Log.SharedState, ILogOutput[])

Log Constructor (String, LogSharedState, ILogOutput)
Creates a new Log.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Log(
    string name,
    LogSharedState stateHolder,
    params ILogOutput[] output
)

Parameters

name
Type: SystemString
The Logs name.
stateHolder
Type: DualityLogSharedState
The Logs state value holder that may be shared with other Logs.
output
Type: DualityILogOutput
It will be initially connected to the specified outputs.
See Also

Reference

Log Class
Log Overload
Duality Namespace


Log Methods

Log Methods

The Log type exposes the following members.

Methods
 | Name | Description
 | AddGlobalOutput |
Public method | AddOutput | Adds an output to write log entries to.
 | Assembly | Returns a string that can be used for representing a Assembly in log entries.
 | ConstructorInfo | Returns a string that can be used for representing a constructor in log entries.
 | CurrentMethod | Returns a string that can be used for representing the current line and method within a source code file. This method uses caller information attributes on its parameters - omit them in order to let the compiler do its work.
 | EventInfo | Returns a string that can be used for representing an event in log entries.
 | Exception | Returns a string that can be used for representing an exception in log entries. It usually does not include the full call stack and is significantly shorter than an Exceptions ToString method.
 | FieldInfo | Returns a string that can be used for representing a field in log entries.
 | MemberInfo | Returns a string that can be used for representing a(ny) member in log entries.
 | MethodInfo(MethodBase, Boolean) | Returns a string that can be used for representing a method or constructor in log entries.
 | MethodInfo(MethodInfo, Boolean) | Returns a string that can be used for representing a method in log entries.
Public method | PopIndent | Decreases the current log entry indent.
 | PropertyInfo | Returns a string that can be used for representing a property in log entries.
Public method | PushIndent | Increases the current log entry indent.
 | RemoveGlobalOutput |
Public method | RemoveOutput | Removes a certain output.
 | Type(TypeInfo) | Returns a string that can be used for representing a TypeInfo in log entries.
 | Type(Type) | Returns a string that can be used for representing a Type in log entries.
Public method | Write | Writes a new log entry.
Public method | WriteError | Writes a new error log entry.
Public method | WriteWarning | Writes a new warning log entry.
Top
See Also

Reference

Log Class
Duality Namespace


Log.AddGlobalOutput Method

LogAddGlobalOutput Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void AddGlobalOutput(
    ILogOutput output
)

Parameters

output
Type: DualityILogOutput
See Also

Reference

Log Class
Duality Namespace


Log.AddOutput Method

LogAddOutput Method
Adds an output to write log entries to.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddOutput(
    ILogOutput writer
)

Parameters

writer
Type: DualityILogOutput
See Also

Reference

Log Class
Duality Namespace


Log.Assembly Method

LogAssembly Method
Returns a string that can be used for representing a Assembly in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Assembly(
    Assembly asm
)

Parameters

asm
Type: System.ReflectionAssembly

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.ConstructorInfo Method

LogConstructorInfo Method
Returns a string that can be used for representing a constructor in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string ConstructorInfo(
    ConstructorInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionConstructorInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the constructors declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.CurrentMethod Method

LogCurrentMethod Method
Returns a string that can be used for representing the current line and method within a source code file. This method uses caller information attributes on its parameters - omit them in order to let the compiler do its work.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string CurrentMethod(
    string callerInfoMember = null,
    string callerInfoFile = null,
    int callerInfoLine = -1
)

Parameters

callerInfoMember (Optional)
Type: SystemString
callerInfoFile (Optional)
Type: SystemString
callerInfoLine (Optional)
Type: SystemInt32

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.EventInfo Method

LogEventInfo Method
Returns a string that can be used for representing an event in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string EventInfo(
    EventInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionEventInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the events declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.Exception Method

LogException Method
Returns a string that can be used for representing an exception in log entries. It usually does not include the full call stack and is significantly shorter than an Exceptions ToString method.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Exception(
    Exception e,
    bool callStack = true
)

Parameters

e
Type: SystemException
callStack (Optional)
Type: SystemBoolean

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.FieldInfo Method

LogFieldInfo Method
Returns a string that can be used for representing a field in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string FieldInfo(
    FieldInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionFieldInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the fields declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.MemberInfo Method

LogMemberInfo Method
Returns a string that can be used for representing a(ny) member in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string MemberInfo(
    MemberInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionMemberInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the members declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.MethodInfo Method

LogMethodInfo Method
Overload List
Name | Description
MethodInfo(MethodBase, Boolean) | Returns a string that can be used for representing a method or constructor in log entries.
MethodInfo(MethodInfo, Boolean) | Returns a string that can be used for representing a method in log entries.
Top
See Also

Reference

Log Class
Duality Namespace


Log.MethodInfo Method (MethodBase, Boolean)

LogMethodInfo Method (MethodBase, Boolean)
Returns a string that can be used for representing a method or constructor in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string MethodInfo(
    MethodBase info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionMethodBase
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the methods or constructors declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
MethodInfo Overload
Duality Namespace


Log.MethodInfo Method (MethodInfo, Boolean)

LogMethodInfo Method (MethodInfo, Boolean)
Returns a string that can be used for representing a method in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string MethodInfo(
    MethodInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionMethodInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the methods declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
MethodInfo Overload
Duality Namespace


Log.PopIndent Method

LogPopIndent Method
Decreases the current log entry indent.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PopIndent()
See Also

Reference

Log Class
Duality Namespace


Log.PropertyInfo Method

LogPropertyInfo Method
Returns a string that can be used for representing a property in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string PropertyInfo(
    PropertyInfo info,
    bool includeDeclaringType = true
)

Parameters

info
Type: System.ReflectionPropertyInfo
includeDeclaringType (Optional)
Type: SystemBoolean
If true, the properties declaring type is included in the returned name.

Return Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.PushIndent Method

LogPushIndent Method
Increases the current log entry indent.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PushIndent()
See Also

Reference

Log Class
Duality Namespace


Log.RemoveGlobalOutput Method

LogRemoveGlobalOutput Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RemoveGlobalOutput(
    ILogOutput output
)

Parameters

output
Type: DualityILogOutput
See Also

Reference

Log Class
Duality Namespace


Log.RemoveOutput Method

LogRemoveOutput Method
Removes a certain output.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveOutput(
    ILogOutput writer
)

Parameters

writer
Type: DualityILogOutput
See Also

Reference

Log Class
Duality Namespace


Log.Type Method

LogType Method
Overload List
Name | Description
Type(TypeInfo) | Returns a string that can be used for representing a TypeInfo in log entries.
Type(Type) | Returns a string that can be used for representing a Type in log entries.
Top
See Also

Reference

Log Class
Duality Namespace


Log.Type Method (TypeInfo)

LogType Method (TypeInfo)
Returns a string that can be used for representing a TypeInfo in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Type(
    TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: String
See Also

Reference

Log Class
Type Overload
Duality Namespace


Log.Type Method (Type)

LogType Method (Type)
Returns a string that can be used for representing a Type in log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Type(
    Type type
)

Parameters

type
Type: SystemType

Return Value

Type: String
See Also

Reference

Log Class
Type Overload
Duality Namespace


Log.Write Method

LogWrite Method
Writes a new log entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Write(
    string format,
    params Object[] obj
)

Parameters

format
Type: SystemString
obj
Type: SystemObject
See Also

Reference

Log Class
Duality Namespace


Log.WriteError Method

LogWriteError Method
Writes a new error log entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void WriteError(
    string format,
    params Object[] obj
)

Parameters

format
Type: SystemString
obj
Type: SystemObject
See Also

Reference

Log Class
Duality Namespace


Log.WriteWarning Method

LogWriteWarning Method
Writes a new warning log entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void WriteWarning(
    string format,
    params Object[] obj
)

Parameters

format
Type: SystemString
obj
Type: SystemObject
See Also

Reference

Log Class
Duality Namespace


Log Properties

Log Properties

The Log type exposes the following members.

Properties
 | Name | Description
 | Core | [GET] A log for core-related entries. This is normally only used by Duality itsself.
 | Editor | [GET] A log for editor-related entries. This is used by the Duality editor and its plugins.
 | Game | [GET] A log for game-related entries. Use this for logging data from game plugins.
Public property | Indent | [GET] The Log's current indent level.
Public property | Name | [GET] The Log's name
Public property | Outputs | [GET] Enumerates all the output writers of this log.
Public property | Prefix | [GET] The Log's prefix, which is automatically determined by its name.
Top
See Also

Reference

Log Class
Duality Namespace


Log.Core Property

LogCore Property
[GET] A log for core-related entries. This is normally only used by Duality itsself.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Log Core { get; }

Property Value

Type: Log
See Also

Reference

Log Class
Duality Namespace


Log.Editor Property

LogEditor Property
[GET] A log for editor-related entries. This is used by the Duality editor and its plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Log Editor { get; }

Property Value

Type: Log
See Also

Reference

Log Class
Duality Namespace


Log.Game Property

LogGame Property
[GET] A log for game-related entries. Use this for logging data from game plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Log Game { get; }

Property Value

Type: Log
See Also

Reference

Log Class
Duality Namespace


Log.Indent Property

LogIndent Property
[GET] The Log's current indent level.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Indent { get; }

Property Value

Type: Int32
See Also

Reference

Log Class
Duality Namespace


Log.Name Property

LogName Property
[GET] The Log's name

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.Outputs Property

LogOutputs Property
[GET] Enumerates all the output writers of this log.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<ILogOutput> Outputs { get; }

Property Value

Type: IEnumerable ILogOutput
See Also

Reference

Log Class
Duality Namespace


Log.Prefix Property

LogPrefix Property
[GET] The Log's prefix, which is automatically determined by its name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Prefix { get; }

Property Value

Type: String
See Also

Reference

Log Class
Duality Namespace


Log.SharedState Class

LogSharedState Class
Holds a Logs state values.
Inheritance Hierarchy
SystemObject
DualityLogSharedState

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class SharedState

The LogSharedState type exposes the following members.

Constructors
 | Name | Description
Public method | LogSharedState | Initializes a new instance of the LogSharedState class
Top
Properties
 | Name | Description
Public property | Indent | [GET / SET] The Logs indent value.
Top
See Also

Reference

Duality Namespace


Log.SharedState Constructor

LogSharedState Constructor
Initializes a new instance of the LogSharedState class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SharedState()
See Also

Reference

LogSharedState Class
Duality Namespace


SharedState Properties

SharedState Properties

The LogSharedState type exposes the following members.

Properties
 | Name | Description
Public property | Indent | [GET / SET] The Logs indent value.
Top
See Also

Reference

LogSharedState Class
Duality Namespace


Log.SharedState.Indent Property

LogSharedStateIndent Property
[GET / SET] The Logs indent value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Indent { get; }

Property Value

Type: Int32
See Also

Reference

LogSharedState Class
Duality Namespace


LogEntry Structure

LogEntry Structure
A log entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct LogEntry

The LogEntry type exposes the following members.

Constructors
 | Name | Description
Public method | LogEntry | Initializes a new instance of the LogEntry class
Top
Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Properties
 | Name | Description
Public property | Context | [GET] The context in which this log was written. Usually the primary object the log entry is associated with.
Public property | FrameStamp | [GET] The value of FrameCount when the message was logged.
Public property | Indent | [GET] The desired indentation level for this log message when displaying it.
Public property | Message | [GET] The log entry's message.
Public property | Source | [GET] The Log from which this entry originates.
Public property | TimeStamp | [GET] The messages timestamp.
Public property | Type | [GET] The messages type.
Top
See Also

Reference

Duality Namespace


LogEntry Constructor

LogEntry Constructor
Initializes a new instance of the LogEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public LogEntry(
    Log source,
    LogMessageType type,
    string msg,
    Object context
)

Parameters

source
Type: DualityLog
type
Type: DualityLogMessageType
msg
Type: SystemString
context
Type: SystemObject
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry Methods

LogEntry Methods

The LogEntry type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.ToString Method

LogEntryToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry Properties

LogEntry Properties

The LogEntry type exposes the following members.

Properties
 | Name | Description
Public property | Context | [GET] The context in which this log was written. Usually the primary object the log entry is associated with.
Public property | FrameStamp | [GET] The value of FrameCount when the message was logged.
Public property | Indent | [GET] The desired indentation level for this log message when displaying it.
Public property | Message | [GET] The log entry's message.
Public property | Source | [GET] The Log from which this entry originates.
Public property | TimeStamp | [GET] The messages timestamp.
Public property | Type | [GET] The messages type.
Top
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.Context Property

LogEntryContext Property
[GET] The context in which this log was written. Usually the primary object the log entry is associated with.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object Context { get; }

Property Value

Type: Object
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.FrameStamp Property

LogEntryFrameStamp Property
[GET] The value of FrameCount when the message was logged.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int FrameStamp { get; }

Property Value

Type: Int32
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.Indent Property

LogEntryIndent Property
[GET] The desired indentation level for this log message when displaying it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Indent { get; }

Property Value

Type: Int32
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.Message Property

LogEntryMessage Property
[GET] The log entry's message.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Message { get; }

Property Value

Type: String
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.Source Property

LogEntrySource Property
[GET] The Log from which this entry originates.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Log Source { get; }

Property Value

Type: Log
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.TimeStamp Property

LogEntryTimeStamp Property
[GET] The messages timestamp.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DateTime TimeStamp { get; }

Property Value

Type: DateTime
See Also

Reference

LogEntry Structure
Duality Namespace


LogEntry.Type Property

LogEntryType Property
[GET] The messages type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public LogMessageType Type { get; }

Property Value

Type: LogMessageType
See Also

Reference

LogEntry Structure
Duality Namespace


LogMessageType Enumeration

LogMessageType Enumeration
The type of a log message / entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum LogMessageType
Members
Member name | Value | Description
Message | 0 | Just a regular message. Nothing special. Neutrally informs about what's going on.
Warning | 1 | A warning message. It informs about unexpected data or behaviour that might not have caused any errors yet, but can lead to them. It might also be used for expected errors from which Duality is likely to recover.
Error | 2 | An error message. It informs about an unexpected and/or critical error that has occurred.
See Also

Reference

Duality Namespace


MathF Class

MathF Class
Provides math utility methods and float versions of Math to fit Duality Single arithmetics.
Inheritance Hierarchy
SystemObject
DualityMathF

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static class MathF

The MathF type exposes the following members.

Methods
Name | Description
Abs(Int32) | Returns the absolute value of a Int32.
Abs(Single) | Returns the absolute value of a Single.
Acos | Returns the inverse cosine value of the specified (radian) angle.
Angle(Single, Single) | Calculates the angle from [0,0] to a specified point in 2D space.
Angle(Single, Single, Single, Single) | Calculates the angle between two points in 2D space.
Asin | Returns the inverse sine value of the specified (radian) angle.
Atan | Returns the inverse tangent value of the specified (radian) angle.
Atan2 | Returns the (radian) angle whose tangent is the quotient of two specified numbers.
Ceiling | Returns the lowest whole-number bigger than the specified one. (Rounds up)
CheckValidValue(Single) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector2) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector3) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CircularDist(Single, Single) | Calculates the distance between two angular (radian) values.
CircularDist(Int32, Int32, Int32, Int32) | Calculates the distance between two values assuming a circular value area.
CircularDist(Single, Single, Single, Single) | Calculates the distance between two values assuming a circular value area.
Clamp(Int32, Int32, Int32) | Clamps a value between minimum and maximum.
Clamp(Single, Single, Single) | Clamps a value between minimum and maximum.
CombineHashCode(Int32) | Combines any number of hash codes.
CombineHashCode(Int32, Int32) | Combines two hash codes.
Cos | Returns the cosine value of the specified (radian) angle.
DegToRad | Converts degrees to radians.
Distance(Single, Single) | Returns the distance between a point and [0,0] in 2d space.
Distance(Single, Single, Single, Single) | Returns the distance between two points in 2d space.
DistanceQuad(Single, Single) | Returns the squared distance between a point and [0,0] in 2d space.
DistanceQuad(Single, Single, Single, Single) | Returns the squared distance between two points in 2d space.
Exp | Returns the specified power of E.
Factorial | Returns the factorial of an integer value.
Floor | Returns the highest whole-number smaller than the specified one. (Rounds down)
GetTransformDotVec(Single, Vector2, Vector2) | Prepares a 2d transformation (rotation).
GetTransformDotVec(Single, Vector2, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
GetTransformDotVec(Single, Single, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
IsPolygonConvex | Returns whether or not the specified polygon is convex.
Lerp(Int32, Int32, Single) | Performs linear interpolation between two values.
Lerp(Single, Single, Single) | Performs linear interpolation between two values.
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
Log(Single) | Returns the natural logarithm of a value.
Log(Single, Single) | Returns the logarithm of a value.
Max(Int32) | Returns the highest of any number of values.
Max(Single) | Returns the highest of any number of values.
Max(Int32, Int32) | Returns the higher of two values.
Max(Single, Single) | Returns the higher of two values.
Max(Int32, Int32, Int32) | Returns the highest of three values.
Max(Single, Single, Single) | Returns the highest of three values.
Max(Int32, Int32, Int32, Int32) | Returns the highest of four values.
Max(Single, Single, Single, Single) | Returns the highest of four values.
Min(Int32) | Returns the lowest of any number of values.
Min(Single) | Returns the lowest of any number of values.
Min(Int32, Int32) | Returns the lower of two values.
Min(Single, Single) | Returns the lower of two values.
Min(Int32, Int32, Int32) | Returns the lowest of three values.
Min(Single, Single, Single) | Returns the lowest of three values.
Min(Int32, Int32, Int32, Int32) | Returns the lowest of four values.
Min(Single, Single, Single, Single) | Returns the lowest of four values.
NextPowerOfTwo | Returns the next power of two that is larger than the specified number.
NormalizeAngle | Normalizes a radian angle to values between zero and TwoPi.
NormalizeVar(Int32, Int32, Int32) | Normalizes a value to the given circular area.
NormalizeVar(Single, Single, Single) | Normalizes a value to the given circular area.
PointLineDistance | Calculates the distance between a point and a line segment (or infinite line).
PointLineNearestPoint | Calculates the point on a line segment (or infinite line) that has the lowest possible distance to a point.
Pow | Returns the specified power of a value.
RadToDeg | Converts radians to degrees.
Round(Single) | Rounds the specified value.
Round(Single, Int32) | Rounds the specified value to a certain number of fraction digits.
Round(Single, MidpointRounding) | Rounds the specified value.
Round(Single, Int32, MidpointRounding) | Rounds the specified value to a certain number of fraction digits.
RoundToInt(Single) | Rounds the specified value to an integer value.
RoundToInt(Single, MidpointRounding) | Rounds the specified value to an integer value.
SafeToDecimal | Converts the specified float value to decimal and clamps it if necessary.
Sign(Int32) | Returns the sign of a value.
Sign(Single) | Returns the sign of a value.
Sin | Returns the sine value of the specified (radian) angle.
Sqrt | Returns a numbers square root.
SwapT | Swaps the values of two variables.
Tan | Returns the tangent value of the specified (radian) angle.
TransformCoord(Single, Single, Single) | Turns a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single) | Turns and scales a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single, Single, Single) | Turns and scales a specific coordinate around the specified center point.
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TurnDir(Single, Single) | Assuming an angular (radian) value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Int32, Int32, Int32, Int32) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Single, Single, Single, Single) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
Top
Fields
Name | Description
E | Euler's number, base of the natural logarithm. Approximately 2.7182818284.
Pi | Mmmhh... pie!
PiOver2 | Equals Pi / 2.
PiOver3 | Equals Pi / 3.
PiOver4 | Equals Pi / 4.
PiOver6 | Equals Pi / 6.
RadAngle1 | A one degree angle in radians.
RadAngle180 | A 180 degree angle in radians. Equals Pi.
RadAngle270 | A 270 degree angle in radians. Equals Pi.
RadAngle30 | A 30 degree angle in radians. Equals PiOver6.
RadAngle360 | A 360 degree angle in radians. Equals TwoPi.
RadAngle45 | A 45 degree angle in radians. Equals PiOver4.
RadAngle90 | A 90 degree angle in radians. Equals PiOver2.
TwoPi | Equals 2 * Pi.
Top
Properties
Name | Description
Rnd | [GET / SET] Global random number generator. Is never null.
Top
See Also

Reference

Duality Namespace


MathF Fields

MathF Fields

The MathF type exposes the following members.

Fields
Name | Description
E | Euler's number, base of the natural logarithm. Approximately 2.7182818284.
Pi | Mmmhh... pie!
PiOver2 | Equals Pi / 2.
PiOver3 | Equals Pi / 3.
PiOver4 | Equals Pi / 4.
PiOver6 | Equals Pi / 6.
RadAngle1 | A one degree angle in radians.
RadAngle180 | A 180 degree angle in radians. Equals Pi.
RadAngle270 | A 270 degree angle in radians. Equals Pi.
RadAngle30 | A 30 degree angle in radians. Equals PiOver6.
RadAngle360 | A 360 degree angle in radians. Equals TwoPi.
RadAngle45 | A 45 degree angle in radians. Equals PiOver4.
RadAngle90 | A 90 degree angle in radians. Equals PiOver2.
TwoPi | Equals 2 * Pi.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.E Field

MathFE Field
Euler's number, base of the natural logarithm. Approximately 2.7182818284.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float E

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Pi Field

MathFPi Field
Mmmhh... pie!

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float Pi

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.PiOver2 Field

MathFPiOver2 Field
Equals Pi / 2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float PiOver2

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.PiOver3 Field

MathFPiOver3 Field
Equals Pi / 3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float PiOver3

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.PiOver4 Field

MathFPiOver4 Field
Equals Pi / 4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float PiOver4

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.PiOver6 Field

MathFPiOver6 Field
Equals Pi / 6.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float PiOver6

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle1 Field

MathFRadAngle1 Field
A one degree angle in radians.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle1

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle180 Field

MathFRadAngle180 Field
A 180 degree angle in radians. Equals Pi.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle180

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle270 Field

MathFRadAngle270 Field
A 270 degree angle in radians. Equals Pi.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle270

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle30 Field

MathFRadAngle30 Field
A 30 degree angle in radians. Equals PiOver6.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle30

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle360 Field

MathFRadAngle360 Field
A 360 degree angle in radians. Equals TwoPi.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle360

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle45 Field

MathFRadAngle45 Field
A 45 degree angle in radians. Equals PiOver4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle45

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadAngle90 Field

MathFRadAngle90 Field
A 90 degree angle in radians. Equals PiOver2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float RadAngle90

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.TwoPi Field

MathFTwoPi Field
Equals 2 * Pi.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public const float TwoPi

Field Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF Methods

MathF Methods

The MathF type exposes the following members.

Methods
Name | Description
Abs(Int32) | Returns the absolute value of a Int32.
Abs(Single) | Returns the absolute value of a Single.
Acos | Returns the inverse cosine value of the specified (radian) angle.
Angle(Single, Single) | Calculates the angle from [0,0] to a specified point in 2D space.
Angle(Single, Single, Single, Single) | Calculates the angle between two points in 2D space.
Asin | Returns the inverse sine value of the specified (radian) angle.
Atan | Returns the inverse tangent value of the specified (radian) angle.
Atan2 | Returns the (radian) angle whose tangent is the quotient of two specified numbers.
Ceiling | Returns the lowest whole-number bigger than the specified one. (Rounds up)
CheckValidValue(Single) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector2) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector3) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CircularDist(Single, Single) | Calculates the distance between two angular (radian) values.
CircularDist(Int32, Int32, Int32, Int32) | Calculates the distance between two values assuming a circular value area.
CircularDist(Single, Single, Single, Single) | Calculates the distance between two values assuming a circular value area.
Clamp(Int32, Int32, Int32) | Clamps a value between minimum and maximum.
Clamp(Single, Single, Single) | Clamps a value between minimum and maximum.
CombineHashCode(Int32) | Combines any number of hash codes.
CombineHashCode(Int32, Int32) | Combines two hash codes.
Cos | Returns the cosine value of the specified (radian) angle.
DegToRad | Converts degrees to radians.
Distance(Single, Single) | Returns the distance between a point and [0,0] in 2d space.
Distance(Single, Single, Single, Single) | Returns the distance between two points in 2d space.
DistanceQuad(Single, Single) | Returns the squared distance between a point and [0,0] in 2d space.
DistanceQuad(Single, Single, Single, Single) | Returns the squared distance between two points in 2d space.
Exp | Returns the specified power of E.
Factorial | Returns the factorial of an integer value.
Floor | Returns the highest whole-number smaller than the specified one. (Rounds down)
GetTransformDotVec(Single, Vector2, Vector2) | Prepares a 2d transformation (rotation).
GetTransformDotVec(Single, Vector2, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
GetTransformDotVec(Single, Single, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
IsPolygonConvex | Returns whether or not the specified polygon is convex.
Lerp(Int32, Int32, Single) | Performs linear interpolation between two values.
Lerp(Single, Single, Single) | Performs linear interpolation between two values.
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
Log(Single) | Returns the natural logarithm of a value.
Log(Single, Single) | Returns the logarithm of a value.
Max(Int32) | Returns the highest of any number of values.
Max(Single) | Returns the highest of any number of values.
Max(Int32, Int32) | Returns the higher of two values.
Max(Single, Single) | Returns the higher of two values.
Max(Int32, Int32, Int32) | Returns the highest of three values.
Max(Single, Single, Single) | Returns the highest of three values.
Max(Int32, Int32, Int32, Int32) | Returns the highest of four values.
Max(Single, Single, Single, Single) | Returns the highest of four values.
Min(Int32) | Returns the lowest of any number of values.
Min(Single) | Returns the lowest of any number of values.
Min(Int32, Int32) | Returns the lower of two values.
Min(Single, Single) | Returns the lower of two values.
Min(Int32, Int32, Int32) | Returns the lowest of three values.
Min(Single, Single, Single) | Returns the lowest of three values.
Min(Int32, Int32, Int32, Int32) | Returns the lowest of four values.
Min(Single, Single, Single, Single) | Returns the lowest of four values.
NextPowerOfTwo | Returns the next power of two that is larger than the specified number.
NormalizeAngle | Normalizes a radian angle to values between zero and TwoPi.
NormalizeVar(Int32, Int32, Int32) | Normalizes a value to the given circular area.
NormalizeVar(Single, Single, Single) | Normalizes a value to the given circular area.
PointLineDistance | Calculates the distance between a point and a line segment (or infinite line).
PointLineNearestPoint | Calculates the point on a line segment (or infinite line) that has the lowest possible distance to a point.
Pow | Returns the specified power of a value.
RadToDeg | Converts radians to degrees.
Round(Single) | Rounds the specified value.
Round(Single, Int32) | Rounds the specified value to a certain number of fraction digits.
Round(Single, MidpointRounding) | Rounds the specified value.
Round(Single, Int32, MidpointRounding) | Rounds the specified value to a certain number of fraction digits.
RoundToInt(Single) | Rounds the specified value to an integer value.
RoundToInt(Single, MidpointRounding) | Rounds the specified value to an integer value.
SafeToDecimal | Converts the specified float value to decimal and clamps it if necessary.
Sign(Int32) | Returns the sign of a value.
Sign(Single) | Returns the sign of a value.
Sin | Returns the sine value of the specified (radian) angle.
Sqrt | Returns a numbers square root.
SwapT | Swaps the values of two variables.
Tan | Returns the tangent value of the specified (radian) angle.
TransformCoord(Single, Single, Single) | Turns a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single) | Turns and scales a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single, Single, Single) | Turns and scales a specific coordinate around the specified center point.
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TurnDir(Single, Single) | Assuming an angular (radian) value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Int32, Int32, Int32, Int32) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Single, Single, Single, Single) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Abs Method

MathFAbs Method
Overload List
Name | Description
Abs(Int32) | Returns the absolute value of a Int32.
Abs(Single) | Returns the absolute value of a Single.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Abs Method (Int32)

MathFAbs Method (Int32)
Returns the absolute value of a Int32.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Abs(
    int v
)

Parameters

v
Type: SystemInt32
A number.

Return Value

Type: Int32
The absolute value of the number.
See Also

Reference

MathF Class
Abs Overload
Duality Namespace


MathF.Abs Method (Single)

MathFAbs Method (Single)
Returns the absolute value of a Single.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Abs(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
The absolute value of the number.
See Also

Reference

MathF Class
Abs Overload
Duality Namespace


MathF.Acos Method

MathFAcos Method
Returns the inverse cosine value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Acos(
    float cos
)

Parameters

cos
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Angle Method

MathFAngle Method
Overload List
Name | Description
Angle(Single, Single) | Calculates the angle from [0,0] to a specified point in 2D space.
Angle(Single, Single, Single, Single) | Calculates the angle between two points in 2D space.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Angle Method (Single, Single)

MathFAngle Method (Single, Single)
Calculates the angle from [0,0] to a specified point in 2D space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Angle(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
The x-Coordinate of the point.
y
Type: SystemSingle
The y-Coordinate of the point.

Return Value

Type: Single
The angle between [0,0] and [x,y] in radians.
See Also

Reference

MathF Class
Angle Overload
Duality Namespace


MathF.Angle Method (Single, Single, Single, Single)

MathFAngle Method (Single, Single, Single, Single)
Calculates the angle between two points in 2D space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Angle(
    float x1,
    float y1,
    float x2,
    float y2
)

Parameters

x1
Type: SystemSingle
The x-Coordinate of the first point.
y1
Type: SystemSingle
The y-Coordinate of the first point.
x2
Type: SystemSingle
The x-Coordinate of the second point.
y2
Type: SystemSingle
The y-Coordinate of the second point.

Return Value

Type: Single
The angle between [x1,y1] and [x2,y2] in radians.
See Also

Reference

MathF Class
Angle Overload
Duality Namespace


MathF.Asin Method

MathFAsin Method
Returns the inverse sine value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Asin(
    float sin
)

Parameters

sin
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Atan Method

MathFAtan Method
Returns the inverse tangent value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Atan(
    float tan
)

Parameters

tan
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Atan2 Method

MathFAtan2 Method
Returns the (radian) angle whose tangent is the quotient of two specified numbers.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Atan2(
    float y,
    float x
)

Parameters

y
Type: SystemSingle
The y coordinate of a point.
x
Type: SystemSingle
The x coordinate of a point.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Ceiling Method

MathFCeiling Method
Returns the lowest whole-number bigger than the specified one. (Rounds up)

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Ceiling(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Duality Namespace
MathFFloor(Single)


MathF.CheckValidValue Method

MathFCheckValidValue Method
Overload List
Name | Description
CheckValidValue(Single) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector2) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
CheckValidValue(Vector3) | Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.CheckValidValue Method (Single)

MathFCheckValidValue Method (Single)
Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CheckValidValue(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

MathF Class
CheckValidValue Overload
Duality Namespace


MathF.CheckValidValue Method (Vector2)

MathFCheckValidValue Method (Vector2)
Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CheckValidValue(
    Vector2 value
)

Parameters

value
Type: DualityVector2
See Also

Reference

MathF Class
CheckValidValue Overload
Duality Namespace


MathF.CheckValidValue Method (Vector3)

MathFCheckValidValue Method (Vector3)
Throws an ArgumentOutOfRangeException, if the specified value is NaN or Infinity.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CheckValidValue(
    Vector3 value
)

Parameters

value
Type: DualityVector3
See Also

Reference

MathF Class
CheckValidValue Overload
Duality Namespace


MathF.CircularDist Method

MathFCircularDist Method
Overload List
Name | Description
CircularDist(Single, Single) | Calculates the distance between two angular (radian) values.
CircularDist(Int32, Int32, Int32, Int32) | Calculates the distance between two values assuming a circular value area.
CircularDist(Single, Single, Single, Single) | Calculates the distance between two values assuming a circular value area.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.CircularDist Method (Single, Single)

MathFCircularDist Method (Single, Single)
Calculates the distance between two angular (radian) values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float CircularDist(
    float v1,
    float v2
)

Parameters

v1
Type: SystemSingle
The first (radian) angle.
v2
Type: SystemSingle
The second (radian) angle.

Return Value

Type: Single
The angular distance in radians between both angles.
See Also

Reference

MathF Class
CircularDist Overload
Duality Namespace


MathF.CircularDist Method (Int32, Int32, Int32, Int32)

MathFCircularDist Method (Int32, Int32, Int32, Int32)
Calculates the distance between two values assuming a circular value area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int CircularDist(
    int v1,
    int v2,
    int vMin,
    int vMax
)

Parameters

v1
Type: SystemInt32
Value 1
v2
Type: SystemInt32
Value 2
vMin
Type: SystemInt32
Value area minimum
vMax
Type: SystemInt32
Value area maximum

Return Value

Type: Int32
Value distance
See Also

Reference

MathF Class
CircularDist Overload
Duality Namespace


MathF.CircularDist Method (Single, Single, Single, Single)

MathFCircularDist Method (Single, Single, Single, Single)
Calculates the distance between two values assuming a circular value area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float CircularDist(
    float v1,
    float v2,
    float vMin,
    float vMax
)

Parameters

v1
Type: SystemSingle
Value 1
v2
Type: SystemSingle
Value 2
vMin
Type: SystemSingle
Value area minimum
vMax
Type: SystemSingle
Value area maximum

Return Value

Type: Single
Value distance
See Also

Reference

MathF Class
CircularDist Overload
Duality Namespace


MathF.Clamp Method

MathFClamp Method
Overload List
Name | Description
Clamp(Int32, Int32, Int32) | Clamps a value between minimum and maximum.
Clamp(Single, Single, Single) | Clamps a value between minimum and maximum.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Clamp Method (Int32, Int32, Int32)

MathFClamp Method (Int32, Int32, Int32)
Clamps a value between minimum and maximum.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Clamp(
    int v,
    int min,
    int max
)

Parameters

v
Type: SystemInt32
The value to clamp.
min
Type: SystemInt32
The minimum value that can't be deceeded.
max
Type: SystemInt32
The maximum value that can't be exceeded.

Return Value

Type: Int32
The clamped value.
See Also

Reference

MathF Class
Clamp Overload
Duality Namespace


MathF.Clamp Method (Single, Single, Single)

MathFClamp Method (Single, Single, Single)
Clamps a value between minimum and maximum.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Clamp(
    float v,
    float min,
    float max
)

Parameters

v
Type: SystemSingle
The value to clamp.
min
Type: SystemSingle
The minimum value that can't be deceeded.
max
Type: SystemSingle
The maximum value that can't be exceeded.

Return Value

Type: Single
The clamped value.
See Also

Reference

MathF Class
Clamp Overload
Duality Namespace


MathF.CombineHashCode Method

MathFCombineHashCode Method
Overload List
Name | Description
CombineHashCode(Int32) | Combines any number of hash codes.
CombineHashCode(Int32, Int32) | Combines two hash codes.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.CombineHashCode Method (Int32[])

MathFCombineHashCode Method (Int32)
Combines any number of hash codes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int CombineHashCode(
    params int[] hashes
)

Parameters

hashes
Type: SystemInt32

Return Value

Type: Int32
See Also

Reference

MathF Class
CombineHashCode Overload
Duality Namespace


MathF.CombineHashCode Method (Int32, Int32)

MathFCombineHashCode Method (Int32, Int32)
Combines two hash codes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CombineHashCode(
    ref int baseHash,
    int otherHash
)

Parameters

baseHash
Type: SystemInt32
otherHash
Type: SystemInt32

Return Value

Type:
See Also

Reference

MathF Class
CombineHashCode Overload
Duality Namespace


MathF.Cos Method

MathFCos Method
Returns the cosine value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Cos(
    float angle
)

Parameters

angle
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.DegToRad Method

MathFDegToRad Method
Converts degrees to radians.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float DegToRad(
    float deg
)

Parameters

deg
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Distance Method

MathFDistance Method
Overload List
Name | Description
Distance(Single, Single) | Returns the distance between a point and [0,0] in 2d space.
Distance(Single, Single, Single, Single) | Returns the distance between two points in 2d space.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Distance Method (Single, Single)

MathFDistance Method (Single, Single)
Returns the distance between a point and [0,0] in 2d space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Distance(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
The x-Coordinate of the point.
y
Type: SystemSingle
The y-Coordinate of the point.

Return Value

Type: Single
The distance between the point and [0,0].
See Also

Reference

MathF Class
Distance Overload
Duality Namespace


MathF.Distance Method (Single, Single, Single, Single)

MathFDistance Method (Single, Single, Single, Single)
Returns the distance between two points in 2d space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Distance(
    float x1,
    float y1,
    float x2,
    float y2
)

Parameters

x1
Type: SystemSingle
The x-Coordinate of the first point.
y1
Type: SystemSingle
The y-Coordinate of the first point.
x2
Type: SystemSingle
The x-Coordinate of the second point.
y2
Type: SystemSingle
The y-Coordinate of the second point.

Return Value

Type: Single
The distance between both points.
See Also

Reference

MathF Class
Distance Overload
Duality Namespace


MathF.DistanceQuad Method

MathFDistanceQuad Method
Overload List
Name | Description
DistanceQuad(Single, Single) | Returns the squared distance between a point and [0,0] in 2d space.
DistanceQuad(Single, Single, Single, Single) | Returns the squared distance between two points in 2d space.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.DistanceQuad Method (Single, Single)

MathFDistanceQuad Method (Single, Single)
Returns the squared distance between a point and [0,0] in 2d space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float DistanceQuad(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
The x-Coordinate of the point.
y
Type: SystemSingle
The y-Coordinate of the point.

Return Value

Type: Single
The distance between the point and [0,0].
Remarks
This method is faster than Distance(Single, Single). If sufficient, such as for distance comparison, consider using this method instead.
See Also

Reference

MathF Class
DistanceQuad Overload
Duality Namespace


MathF.DistanceQuad Method (Single, Single, Single, Single)

MathFDistanceQuad Method (Single, Single, Single, Single)
Returns the squared distance between two points in 2d space.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float DistanceQuad(
    float x1,
    float y1,
    float x2,
    float y2
)

Parameters

x1
Type: SystemSingle
The x-Coordinate of the first point.
y1
Type: SystemSingle
The y-Coordinate of the first point.
x2
Type: SystemSingle
The x-Coordinate of the second point.
y2
Type: SystemSingle
The y-Coordinate of the second point.

Return Value

Type: Single
The distance between both points.
Remarks
This method is faster than Distance(Single, Single, Single, Single). If sufficient, such as for distance comparison, consider using this method instead.
See Also

Reference

MathF Class
DistanceQuad Overload
Duality Namespace


MathF.Exp Method

MathFExp Method
Returns the specified power of E.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Exp(
    float v
)

Parameters

v
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Factorial Method

MathFFactorial Method
Returns the factorial of an integer value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Factorial(
    int n
)

Parameters

n
Type: SystemInt32
A number.

Return Value

Type: Int32
The factorial of the number.
See Also

Reference

MathF Class
Duality Namespace


MathF.Floor Method

MathFFloor Method
Returns the highest whole-number smaller than the specified one. (Rounds down)

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Floor(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Duality Namespace
MathFCeiling(Single)


MathF.GetTransformDotVec Method

MathFGetTransformDotVec Method
Overload List
Name | Description
GetTransformDotVec(Single, Vector2, Vector2) | Prepares a 2d transformation (rotation).
GetTransformDotVec(Single, Vector2, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
GetTransformDotVec(Single, Single, Vector2, Vector2) | Prepares a 2d transformation (rotation and scale).
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.GetTransformDotVec Method (Single, Vector2, Vector2)

MathFGetTransformDotVec Method (Single, Vector2, Vector2)
Prepares a 2d transformation (rotation).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void GetTransformDotVec(
    float rot,
    out Vector2 xDot,
    out Vector2 yDot
)

Parameters

rot
Type: SystemSingle
The rotation to apply in radians.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
GetTransformDotVec Overload
Duality Namespace
MathFTransformDotVec(Vector2, Vector2, Vector2)


MathF.GetTransformDotVec Method (Single, Vector2, Vector2, Vector2)

MathFGetTransformDotVec Method (Single, Vector2, Vector2, Vector2)
Prepares a 2d transformation (rotation and scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void GetTransformDotVec(
    float rot,
    Vector2 scale,
    out Vector2 xDot,
    out Vector2 yDot
)

Parameters

rot
Type: SystemSingle
The rotation to apply in radians.
scale
Type: DualityVector2
The scale factor to apply.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
GetTransformDotVec Overload
Duality Namespace


MathF.GetTransformDotVec Method (Single, Single, Vector2, Vector2)

MathFGetTransformDotVec Method (Single, Single, Vector2, Vector2)
Prepares a 2d transformation (rotation and scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void GetTransformDotVec(
    float rot,
    float scale,
    out Vector2 xDot,
    out Vector2 yDot
)

Parameters

rot
Type: SystemSingle
The rotation to apply in radians.
scale
Type: SystemSingle
The scale factor to apply.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
GetTransformDotVec Overload
Duality Namespace


MathF.IsPolygonConvex Method

MathFIsPolygonConvex Method
Returns whether or not the specified polygon is convex.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool IsPolygonConvex(
    params Vector2[] vertices
)

Parameters

vertices
Type: DualityVector2

Return Value

Type: Boolean
See Also

Reference

MathF Class
Duality Namespace


MathF.Lerp Method

MathFLerp Method
Overload List
Name | Description
Lerp(Int32, Int32, Single) | Performs linear interpolation between two values.
Lerp(Single, Single, Single) | Performs linear interpolation between two values.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Lerp Method (Int32, Int32, Single)

MathFLerp Method (Int32, Int32, Single)
Performs linear interpolation between two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Lerp(
    int a,
    int b,
    float ratio
)

Parameters

a
Type: SystemInt32
The first anchor value.
b
Type: SystemInt32
The second anchor value.
ratio
Type: SystemSingle
Ratio between first and second anchor. Zero will result in anchor a, one will result in anchor b.

Return Value

Type: Int32
See Also

Reference

MathF Class
Lerp Overload
Duality Namespace


MathF.Lerp Method (Single, Single, Single)

MathFLerp Method (Single, Single, Single)
Performs linear interpolation between two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Lerp(
    float a,
    float b,
    float ratio
)

Parameters

a
Type: SystemSingle
The first anchor value.
b
Type: SystemSingle
The second anchor value.
ratio
Type: SystemSingle
Ratio between first and second anchor. Zero will result in anchor a, one will result in anchor b.

Return Value

Type: Single
See Also

Reference

MathF Class
Lerp Overload
Duality Namespace


MathF.LinesCross Method

MathFLinesCross Method
Overload List
Name | Description
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
LinesCross(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean) | Checks, if two line segments (or infinite lines) cross and determines their mutual point.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.LinesCross Method (Single, Single, Single, Single, Single, Single, Single, Single, Boolean)

MathFLinesCross Method (Single, Single, Single, Single, Single, Single, Single, Single, Boolean)
Checks, if two line segments (or infinite lines) cross and determines their mutual point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool LinesCross(
    float startX1,
    float startY1,
    float endX1,
    float endY1,
    float startX2,
    float startY2,
    float endX2,
    float endY2,
    bool infinite = false
)

Parameters

startX1
Type: SystemSingle
x-Coordinate of the first lines start.
startY1
Type: SystemSingle
y-Coordinate of the first lines start.
endX1
Type: SystemSingle
x-Coordinate of the first lines end.
endY1
Type: SystemSingle
y-Coordinate of the first lines end.
startX2
Type: SystemSingle
x-Coordinate of the second lines start.
startY2
Type: SystemSingle
y-Coordinate of the second lines start.
endX2
Type: SystemSingle
x-Coordinate of the second lines end.
endY2
Type: SystemSingle
y-Coordinate of the second lines end.
infinite (Optional)
Type: SystemBoolean
Whether the lines are considered infinite.

Return Value

Type: Boolean
True, if the lines cross, false if not.
See Also

Reference

MathF Class
LinesCross Overload
Duality Namespace


MathF.LinesCross Method (Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean)

MathFLinesCross Method (Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean)
Checks, if two line segments (or infinite lines) cross and determines their mutual point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool LinesCross(
    float startX1,
    float startY1,
    float endX1,
    float endY1,
    float startX2,
    float startY2,
    float endX2,
    float endY2,
    out float crossX,
    out float crossY,
    bool infinite = false
)

Parameters

startX1
Type: SystemSingle
x-Coordinate of the first lines start.
startY1
Type: SystemSingle
y-Coordinate of the first lines start.
endX1
Type: SystemSingle
x-Coordinate of the first lines end.
endY1
Type: SystemSingle
y-Coordinate of the first lines end.
startX2
Type: SystemSingle
x-Coordinate of the second lines start.
startY2
Type: SystemSingle
y-Coordinate of the second lines start.
endX2
Type: SystemSingle
x-Coordinate of the second lines end.
endY2
Type: SystemSingle
y-Coordinate of the second lines end.
crossX
Type: SystemSingle
x-Coordiante at which both lines cross.
crossY
Type: SystemSingle
y-Coordinate at which both lines cross.
infinite (Optional)
Type: SystemBoolean
Whether the lines are considered infinite.

Return Value

Type: Boolean
True, if the lines cross, false if not.
See Also

Reference

MathF Class
LinesCross Overload
Duality Namespace


MathF.Log Method

MathFLog Method
Overload List
Name | Description
Log(Single) | Returns the natural logarithm of a value.
Log(Single, Single) | Returns the logarithm of a value.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Log Method (Single)

MathFLog Method (Single)
Returns the natural logarithm of a value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Log(
    float v
)

Parameters

v
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

MathF Class
Log Overload
Duality Namespace


MathF.Log Method (Single, Single)

MathFLog Method (Single, Single)
Returns the logarithm of a value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Log(
    float v,
    float newBase
)

Parameters

v
Type: SystemSingle
The value whichs logarithm is to be calculated.
newBase
Type: SystemSingle
The base of the logarithm.

Return Value

Type: Single
See Also

Reference

MathF Class
Log Overload
Duality Namespace


MathF.Max Method

MathFMax Method
Overload List
Name | Description
Max(Int32) | Returns the highest of any number of values.
Max(Single) | Returns the highest of any number of values.
Max(Int32, Int32) | Returns the higher of two values.
Max(Single, Single) | Returns the higher of two values.
Max(Int32, Int32, Int32) | Returns the highest of three values.
Max(Single, Single, Single) | Returns the highest of three values.
Max(Int32, Int32, Int32, Int32) | Returns the highest of four values.
Max(Single, Single, Single, Single) | Returns the highest of four values.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Max Method (Int32[])

MathFMax Method (Int32)
Returns the highest of any number of values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Max(
    params int[] v
)

Parameters

v
Type: SystemInt32

Return Value

Type: Int32
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Single[])

MathFMax Method (Single)
Returns the highest of any number of values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Max(
    params float[] v
)

Parameters

v
Type: SystemSingle

Return Value

Type: Single
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Int32, Int32)

MathFMax Method (Int32, Int32)
Returns the higher of two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Max(
    int v1,
    int v2
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32

Return Value

Type: Int32
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Single, Single)

MathFMax Method (Single, Single)
Returns the higher of two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Max(
    float v1,
    float v2
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle

Return Value

Type: Single
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Int32, Int32, Int32)

MathFMax Method (Int32, Int32, Int32)
Returns the highest of three values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Max(
    int v1,
    int v2,
    int v3
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32
v3
Type: SystemInt32

Return Value

Type: Int32
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Single, Single, Single)

MathFMax Method (Single, Single, Single)
Returns the highest of three values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Max(
    float v1,
    float v2,
    float v3
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle
v3
Type: SystemSingle

Return Value

Type: Single
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Int32, Int32, Int32, Int32)

MathFMax Method (Int32, Int32, Int32, Int32)
Returns the highest of four values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Max(
    int v1,
    int v2,
    int v3,
    int v4
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32
v3
Type: SystemInt32
v4
Type: SystemInt32

Return Value

Type: Int32
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Max Method (Single, Single, Single, Single)

MathFMax Method (Single, Single, Single, Single)
Returns the highest of four values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Max(
    float v1,
    float v2,
    float v3,
    float v4
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle
v3
Type: SystemSingle
v4
Type: SystemSingle

Return Value

Type: Single
The highest value.
See Also

Reference

MathF Class
Max Overload
Duality Namespace


MathF.Min Method

MathFMin Method
Overload List
Name | Description
Min(Int32) | Returns the lowest of any number of values.
Min(Single) | Returns the lowest of any number of values.
Min(Int32, Int32) | Returns the lower of two values.
Min(Single, Single) | Returns the lower of two values.
Min(Int32, Int32, Int32) | Returns the lowest of three values.
Min(Single, Single, Single) | Returns the lowest of three values.
Min(Int32, Int32, Int32, Int32) | Returns the lowest of four values.
Min(Single, Single, Single, Single) | Returns the lowest of four values.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Min Method (Int32[])

MathFMin Method (Int32)
Returns the lowest of any number of values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Min(
    params int[] v
)

Parameters

v
Type: SystemInt32

Return Value

Type: Int32
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Single[])

MathFMin Method (Single)
Returns the lowest of any number of values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Min(
    params float[] v
)

Parameters

v
Type: SystemSingle

Return Value

Type: Single
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Int32, Int32)

MathFMin Method (Int32, Int32)
Returns the lower of two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Min(
    int v1,
    int v2
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32

Return Value

Type: Int32
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Single, Single)

MathFMin Method (Single, Single)
Returns the lower of two values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Min(
    float v1,
    float v2
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle

Return Value

Type: Single
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Int32, Int32, Int32)

MathFMin Method (Int32, Int32, Int32)
Returns the lowest of three values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Min(
    int v1,
    int v2,
    int v3
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32
v3
Type: SystemInt32

Return Value

Type: Int32
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Single, Single, Single)

MathFMin Method (Single, Single, Single)
Returns the lowest of three values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Min(
    float v1,
    float v2,
    float v3
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle
v3
Type: SystemSingle

Return Value

Type: Single
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Int32, Int32, Int32, Int32)

MathFMin Method (Int32, Int32, Int32, Int32)
Returns the lowest of four values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Min(
    int v1,
    int v2,
    int v3,
    int v4
)

Parameters

v1
Type: SystemInt32
v2
Type: SystemInt32
v3
Type: SystemInt32
v4
Type: SystemInt32

Return Value

Type: Int32
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.Min Method (Single, Single, Single, Single)

MathFMin Method (Single, Single, Single, Single)
Returns the lowest of four values.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Min(
    float v1,
    float v2,
    float v3,
    float v4
)

Parameters

v1
Type: SystemSingle
v2
Type: SystemSingle
v3
Type: SystemSingle
v4
Type: SystemSingle

Return Value

Type: Single
The lowest value.
See Also

Reference

MathF Class
Min Overload
Duality Namespace


MathF.NextPowerOfTwo Method

MathFNextPowerOfTwo Method
Returns the next power of two that is larger than the specified number.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int NextPowerOfTwo(
    int n
)

Parameters

n
Type: SystemInt32
The specified number.

Return Value

Type: Int32
The next power of two.
See Also

Reference

MathF Class
Duality Namespace


MathF.NormalizeAngle Method

MathFNormalizeAngle Method
Normalizes a radian angle to values between zero and TwoPi.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float NormalizeAngle(
    float var
)

Parameters

var
Type: SystemSingle

Return Value

Type: Single
The normalized value between zero and TwoPi.
Examples
NormalizeAngle(TwoPi + Pi) will return Pi.
See Also

Reference

MathF Class
Duality Namespace


MathF.NormalizeVar Method

MathFNormalizeVar Method
Overload List
Name | Description
NormalizeVar(Int32, Int32, Int32) | Normalizes a value to the given circular area.
NormalizeVar(Single, Single, Single) | Normalizes a value to the given circular area.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.NormalizeVar Method (Int32, Int32, Int32)

MathFNormalizeVar Method (Int32, Int32, Int32)
Normalizes a value to the given circular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int NormalizeVar(
    int var,
    int min,
    int max
)

Parameters

var
Type: SystemInt32
min
Type: SystemInt32
max
Type: SystemInt32

Return Value

Type: Int32
The normalized value between min (inclusive) and max (exclusive).
Examples
NormalizeVar(480, 0, 360) will return 120.
See Also

Reference

MathF Class
NormalizeVar Overload
Duality Namespace


MathF.NormalizeVar Method (Single, Single, Single)

MathFNormalizeVar Method (Single, Single, Single)
Normalizes a value to the given circular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float NormalizeVar(
    float var,
    float min,
    float max
)

Parameters

var
Type: SystemSingle
min
Type: SystemSingle
max
Type: SystemSingle

Return Value

Type: Single
The normalized value between min (inclusive) and max (exclusive).
Examples
NormalizeVar(480, 0, 360) will return 120.
See Also

Reference

MathF Class
NormalizeVar Overload
Duality Namespace


MathF.PointLineDistance Method

MathFPointLineDistance Method
Calculates the distance between a point and a line segment (or infinite line).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float PointLineDistance(
    float pX,
    float pY,
    float lX1,
    float lY1,
    float lX2,
    float lY2,
    bool infinite = false
)

Parameters

pX
Type: SystemSingle
x-Coordinate of the point.
pY
Type: SystemSingle
y-Coordinate of the point.
lX1
Type: SystemSingle
x-Coordinate of the lines start.
lY1
Type: SystemSingle
y-Coordinate of the lines start.
lX2
Type: SystemSingle
x-Coordinate of the lines end.
lY2
Type: SystemSingle
y-Coordinate of the lines end.
infinite (Optional)
Type: SystemBoolean
Whether the line is considered infinite.

Return Value

Type: Single
The distance between point and line.
See Also

Reference

MathF Class
Duality Namespace


MathF.PointLineNearestPoint Method

MathFPointLineNearestPoint Method
Calculates the point on a line segment (or infinite line) that has the lowest possible distance to a point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 PointLineNearestPoint(
    float pX,
    float pY,
    float lX1,
    float lY1,
    float lX2,
    float lY2,
    bool infinite = false
)

Parameters

pX
Type: SystemSingle
x-Coordinate of the point.
pY
Type: SystemSingle
y-Coordinate of the point.
lX1
Type: SystemSingle
x-Coordinate of the lines start.
lY1
Type: SystemSingle
y-Coordinate of the lines start.
lX2
Type: SystemSingle
x-Coordinate of the lines end.
lY2
Type: SystemSingle
y-Coordinate of the lines end.
infinite (Optional)
Type: SystemBoolean
Whether the line is considered infinite.

Return Value

Type: Vector2
A point located on the specified line that is as close as possible to the specified point.
See Also

Reference

MathF Class
Duality Namespace


MathF.Pow Method

MathFPow Method
Returns the specified power of a value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Pow(
    float v,
    float e
)

Parameters

v
Type: SystemSingle
The base value.
e
Type: SystemSingle
Specifies the power to return.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.RadToDeg Method

MathFRadToDeg Method
Converts radians to degrees.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float RadToDeg(
    float rad
)

Parameters

rad
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Round Method

MathFRound Method
Overload List
Name | Description
Round(Single) | Rounds the specified value.
Round(Single, Int32) | Rounds the specified value to a certain number of fraction digits.
Round(Single, MidpointRounding) | Rounds the specified value.
Round(Single, Int32, MidpointRounding) | Rounds the specified value to a certain number of fraction digits.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Round Method (Single)

MathFRound Method (Single)
Rounds the specified value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Round(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Round Overload
Duality Namespace


MathF.Round Method (Single, Int32)

MathFRound Method (Single, Int32)
Rounds the specified value to a certain number of fraction digits.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Round(
    float v,
    int digits
)

Parameters

v
Type: SystemSingle
A number.
digits
Type: SystemInt32
The number of fraction digits to round to.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Round Overload
Duality Namespace


MathF.Round Method (Single, MidpointRounding)

MathFRound Method (Single, MidpointRounding)
Rounds the specified value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Round(
    float v,
    MidpointRounding mode
)

Parameters

v
Type: SystemSingle
A number.
mode
Type: SystemMidpointRounding
Specifies what happens if the value is exactly inbetween two numbers.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Round Overload
Duality Namespace


MathF.Round Method (Single, Int32, MidpointRounding)

MathFRound Method (Single, Int32, MidpointRounding)
Rounds the specified value to a certain number of fraction digits.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Round(
    float v,
    int digits,
    MidpointRounding mode
)

Parameters

v
Type: SystemSingle
A number.
digits
Type: SystemInt32
The number of fraction digits to round to.
mode
Type: SystemMidpointRounding
Specifies what happens if the value is exactly inbetween two numbers.

Return Value

Type: Single
The rounded number.
See Also

Reference

MathF Class
Round Overload
Duality Namespace


MathF.RoundToInt Method

MathFRoundToInt Method
Overload List
Name | Description
RoundToInt(Single) | Rounds the specified value to an integer value.
RoundToInt(Single, MidpointRounding) | Rounds the specified value to an integer value.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.RoundToInt Method (Single)

MathFRoundToInt Method (Single)
Rounds the specified value to an integer value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int RoundToInt(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Int32
The rounded number as Int32.
See Also

Reference

MathF Class
RoundToInt Overload
Duality Namespace
MathFRound(Single)


MathF.RoundToInt Method (Single, MidpointRounding)

MathFRoundToInt Method (Single, MidpointRounding)
Rounds the specified value to an integer value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int RoundToInt(
    float v,
    MidpointRounding mode
)

Parameters

v
Type: SystemSingle
A number.
mode
Type: SystemMidpointRounding
Specifies what happens if the value is exactly inbetween two numbers.

Return Value

Type: Int32
The rounded number as Int32.
See Also

Reference

MathF Class
RoundToInt Overload
Duality Namespace
MathFRound(Single, MidpointRounding)


MathF.SafeToDecimal Method

MathFSafeToDecimal Method
Converts the specified float value to decimal and clamps it if necessary.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static decimal SafeToDecimal(
    float v
)

Parameters

v
Type: SystemSingle

Return Value

Type: Decimal
See Also

Reference

MathF Class
Duality Namespace


MathF.Sign Method

MathFSign Method
Overload List
Name | Description
Sign(Int32) | Returns the sign of a value.
Sign(Single) | Returns the sign of a value.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Sign Method (Int32)

MathFSign Method (Int32)
Returns the sign of a value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int Sign(
    int v
)

Parameters

v
Type: SystemInt32
A number.

Return Value

Type: Int32
-1 if negative, 1 if positive and 0 if zero.
See Also

Reference

MathF Class
Sign Overload
Duality Namespace


MathF.Sign Method (Single)

MathFSign Method (Single)
Returns the sign of a value.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Sign(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
-1 if negative, 1 if positive and 0 if zero.
See Also

Reference

MathF Class
Sign Overload
Duality Namespace


MathF.Sin Method

MathFSin Method
Returns the sine value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Sin(
    float angle
)

Parameters

angle
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.Sqrt Method

MathFSqrt Method
Returns a numbers square root.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Sqrt(
    float v
)

Parameters

v
Type: SystemSingle
A number.

Return Value

Type: Single
The numbers square root.
See Also

Reference

MathF Class
Duality Namespace


MathF.Swap(T) Method

MathFSwapT Method
Swaps the values of two variables.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Swap<T>(
    ref T first,
    ref T second
)

Parameters

first
Type: T
second
Type: T

Type Parameters

T
See Also

Reference

MathF Class
Duality Namespace


MathF.Tan Method

MathFTan Method
Returns the tangent value of the specified (radian) angle.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Tan(
    float angle
)

Parameters

angle
Type: SystemSingle
A radian angle.

Return Value

Type: Single
See Also

Reference

MathF Class
Duality Namespace


MathF.TransformCoord Method

MathFTransformCoord Method
Overload List
Name | Description
TransformCoord(Single, Single, Single) | Turns a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single) | Turns and scales a specific coordinate around [0,0].
TransformCoord(Single, Single, Single, Single, Single, Single) | Turns and scales a specific coordinate around the specified center point.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.TransformCoord Method (Single, Single, Single)

MathFTransformCoord Method (Single, Single, Single)
Turns a specific coordinate around [0,0].

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformCoord(
    ref float xCoord,
    ref float yCoord,
    float rot
)

Parameters

xCoord
Type: SystemSingle
The x-Coordinate to transform.
yCoord
Type: SystemSingle
The y-Coordinate to transform.
rot
Type: SystemSingle
The rotation to apply in radians.
See Also

Reference

MathF Class
TransformCoord Overload
Duality Namespace


MathF.TransformCoord Method (Single, Single, Single, Single)

MathFTransformCoord Method (Single, Single, Single, Single)
Turns and scales a specific coordinate around [0,0].

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformCoord(
    ref float xCoord,
    ref float yCoord,
    float rot,
    float scale
)

Parameters

xCoord
Type: SystemSingle
The x-Coordinate to transform.
yCoord
Type: SystemSingle
The y-Coordinate to transform.
rot
Type: SystemSingle
The rotation to apply in radians.
scale
Type: SystemSingle
The scale factor to apply.
See Also

Reference

MathF Class
TransformCoord Overload
Duality Namespace


MathF.TransformCoord Method (Single, Single, Single, Single, Single, Single)

MathFTransformCoord Method (Single, Single, Single, Single, Single, Single)
Turns and scales a specific coordinate around the specified center point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformCoord(
    ref float xCoord,
    ref float yCoord,
    float rot,
    float scale,
    float xCenter,
    float yCenter
)

Parameters

xCoord
Type: SystemSingle
The x-Coordinate to transform.
yCoord
Type: SystemSingle
The y-Coordinate to transform.
rot
Type: SystemSingle
The rotation to apply in radians.
scale
Type: SystemSingle
The scale factor to apply.
xCenter
Type: SystemSingle
The x-Coordinate of the transformations origin.
yCenter
Type: SystemSingle
The y-Coordinate of the transformations origin.
See Also

Reference

MathF Class
TransformCoord Overload
Duality Namespace


MathF.TransformDotVec Method

MathFTransformDotVec Method
Overload List
Name | Description
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector2, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
TransformDotVec(Vector3, Vector2, Vector2) | Performs a 2d transformation
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.TransformDotVec Method (Vector2, Vector2, Vector2)

MathFTransformDotVec Method (Vector2, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 TransformDotVec(
    Vector2 vec,
    Vector2 xDot,
    Vector2 yDot
)

Parameters

vec
Type: DualityVector2
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.

Return Value

Type: Vector2
The transformed vector.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TransformDotVec Method (Vector2, Vector2, Vector2)

MathFTransformDotVec Method (Vector2, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformDotVec(
    ref Vector2 vec,
    Vector2 xDot,
    Vector2 yDot
)

Parameters

vec
Type: DualityVector2
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TransformDotVec Method (Vector2, Vector2, Vector2)

MathFTransformDotVec Method (Vector2, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformDotVec(
    ref Vector2 vec,
    ref Vector2 xDot,
    ref Vector2 yDot
)

Parameters

vec
Type: DualityVector2
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TransformDotVec Method (Vector3, Vector2, Vector2)

MathFTransformDotVec Method (Vector3, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 TransformDotVec(
    Vector3 vec,
    Vector2 xDot,
    Vector2 yDot
)

Parameters

vec
Type: DualityVector3
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.

Return Value

Type: Vector3
The transformed vector.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TransformDotVec Method (Vector3, Vector2, Vector2)

MathFTransformDotVec Method (Vector3, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformDotVec(
    ref Vector3 vec,
    Vector2 xDot,
    Vector2 yDot
)

Parameters

vec
Type: DualityVector3
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TransformDotVec Method (Vector3, Vector2, Vector2)

MathFTransformDotVec Method (Vector3, Vector2, Vector2)
Performs a 2d transformation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void TransformDotVec(
    ref Vector3 vec,
    ref Vector2 xDot,
    ref Vector2 yDot
)

Parameters

vec
Type: DualityVector3
The vector to transform.
xDot
Type: DualityVector2
Dot product base for the transformed x value.
yDot
Type: DualityVector2
Dot product base for the transformed y value.
See Also

Reference

MathF Class
TransformDotVec Overload
Duality Namespace
MathFGetTransformDotVec(Single, Vector2, Vector2)


MathF.TurnDir Method

MathFTurnDir Method
Overload List
Name | Description
TurnDir(Single, Single) | Assuming an angular (radian) value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Int32, Int32, Int32, Int32) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
TurnDir(Single, Single, Single, Single) | Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.TurnDir Method (Single, Single)

MathFTurnDir Method (Single, Single)
Assuming an angular (radian) value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float TurnDir(
    float val1,
    float val2
)

Parameters

val1
Type: SystemSingle
The first (source) value.
val2
Type: SystemSingle
The second (destination) value.

Return Value

Type: Single
-1 for "left" / lower, 1 for "right" / higher and 0 for "stay" / equal
See Also

Reference

MathF Class
TurnDir Overload
Duality Namespace


MathF.TurnDir Method (Int32, Int32, Int32, Int32)

MathFTurnDir Method (Int32, Int32, Int32, Int32)
Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static int TurnDir(
    int val1,
    int val2,
    int minVal,
    int maxVal
)

Parameters

val1
Type: SystemInt32
The first (source) value.
val2
Type: SystemInt32
The second (destination) value.
minVal
Type: SystemInt32
Minimum value.
maxVal
Type: SystemInt32
Maximum value.

Return Value

Type: Int32
-1 for "left" / lower, 1 for "right" / higher and 0 for "stay" / equal
See Also

Reference

MathF Class
TurnDir Overload
Duality Namespace


MathF.TurnDir Method (Single, Single, Single, Single)

MathFTurnDir Method (Single, Single, Single, Single)
Assuming a circular value area, this method returns the direction to "turn" value 1 to when it comes to take the shortest way to value 2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float TurnDir(
    float val1,
    float val2,
    float minVal,
    float maxVal
)

Parameters

val1
Type: SystemSingle
The first (source) value.
val2
Type: SystemSingle
The second (destination) value.
minVal
Type: SystemSingle
Minimum value.
maxVal
Type: SystemSingle
Maximum value.

Return Value

Type: Single
-1 for "left" / lower, 1 for "right" / higher and 0 for "stay" / equal
See Also

Reference

MathF Class
TurnDir Overload
Duality Namespace


MathF Properties

MathF Properties

The MathF type exposes the following members.

Properties
Name | Description
Rnd | [GET / SET] Global random number generator. Is never null.
Top
See Also

Reference

MathF Class
Duality Namespace


MathF.Rnd Property

MathFRnd Property
[GET / SET] Global random number generator. Is never null.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Random Rnd { get; set; }

Property Value

Type: Random
See Also

Reference

MathF Class
Duality Namespace


Matrix3 Structure

Matrix3 Structure
Represents a 3x3 matrix containing 3D rotation and scale.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Matrix3 : IEquatable<Matrix3>

The Matrix3 type exposes the following members.

Constructors
 | Name | Description
Public method | Matrix3(Matrix4) | Constructs a new instance.
Public method | Matrix3(Vector3, Vector3, Vector3) | Constructs a new instance.
Public method | Matrix3(Single, Single, Single, Single, Single, Single, Single, Single, Single) | Constructs a new instance.
Top
Methods
 | Name | Description
Public method | ClearRotation | Returns a copy of this Matrix3 without rotation.
Public method | ClearScale | Returns a copy of this Matrix3 without scale.
 | CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromAxisAngle(Vector3, Single, Matrix3) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromQuaternion(Quaternion) | Build a rotation matrix from the specified quaternion.
 | CreateFromQuaternion(Quaternion, Matrix3) | Build a rotation matrix from the specified quaternion.
 | CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationX(Single, Matrix3) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationY(Single, Matrix3) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateRotationZ(Single, Matrix3) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateScale(Single) | Creates a scale matrix.
 | CreateScale(Vector3) | Creates a scale matrix.
 | CreateScale(Single, Matrix3) | Creates a scale matrix.
 | CreateScale(Vector3, Matrix3) | Creates a scale matrix.
 | CreateScale(Single, Single, Single) | Creates a scale matrix.
 | CreateScale(Single, Single, Single, Matrix3) | Creates a scale matrix.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix3) | Indicates whether the current matrix is equal to another matrix.
Public method | ExtractRotation | Returns the rotation component of this instance. Quite slow.
Public method | ExtractScale | Returns the scale component of this instance.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix3) | Calculate the inverse of the given matrix
 | Invert(Matrix3, Matrix3) | Calculate the inverse of the given matrix
Public method | Inverted | Returns an inverted copy of this instance.
 | Mult(Matrix3, Matrix3) | Multiplies two instances.
 | Mult(Matrix3, Matrix3, Matrix3) | Multiplies two instances.
Public method | Normalize | Divides each element in the Matrix by the Determinant.
Public method | Normalized | Returns a normalised copy of this instance.
Public method | ToString | Returns a System.String that represents the current Matrix3d. (Overrides ValueTypeToString.)
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix3) | Calculate the transpose of the given matrix
 | Transpose(Matrix3, Matrix3) | Calculate the transpose of the given matrix
Top
Operators
Name | Description
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply | Matrix multiplication
Top
Fields
 | Name | Description
 | Identity | The identity matrix.
Public field | Row0 | First row of the matrix.
Public field | Row1 | Second row of the matrix.
Public field | Row2 | Third row of the matrix.
 | Zero | The zero matrix.
Top
Properties
 | Name | Description
Public property | Column0 | Gets the first column of this matrix.
Public property | Column1 | Gets the second column of this matrix.
Public property | Column2 | Gets the third column of this matrix.
Public property | Determinant | Gets the determinant of this matrix.
Public property | Diagonal | Gets or sets the values along the main diagonal of the matrix.
Public property | Item | Gets or sets the value at a specified row and column.
Public property | M11 | Gets or sets the value at row 1, column 1 of this instance.
Public property | M12 | Gets or sets the value at row 1, column 2 of this instance.
Public property | M13 | Gets or sets the value at row 1, column 3 of this instance.
Public property | M21 | Gets or sets the value at row 2, column 1 of this instance.
Public property | M22 | Gets or sets the value at row 2, column 2 of this instance.
Public property | M23 | Gets or sets the value at row 2, column 3 of this instance.
Public property | M31 | Gets or sets the value at row 3, column 1 of this instance.
Public property | M32 | Gets or sets the value at row 3, column 2 of this instance.
Public property | M33 | Gets or sets the value at row 3, column 3 of this instance.
Public property | Trace | Gets the trace of the matrix, the sum of the values along the diagonal.
Top
See Also

Reference

Duality Namespace


Matrix3 Constructor

Matrix3 Constructor
Overload List
 | Name | Description
Public method | Matrix3(Matrix4) | Constructs a new instance.
Public method | Matrix3(Vector3, Vector3, Vector3) | Constructs a new instance.
Public method | Matrix3(Single, Single, Single, Single, Single, Single, Single, Single, Single) | Constructs a new instance.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3 Constructor (Matrix4)

Matrix3 Constructor (Matrix4)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3(
    Matrix4 matrix
)

Parameters

matrix
Type: DualityMatrix4
A Matrix4 to take the upper-left 3x3 from.
See Also

Reference

Matrix3 Structure
Matrix3 Overload
Duality Namespace


Matrix3 Constructor (Vector3, Vector3, Vector3)

Matrix3 Constructor (Vector3, Vector3, Vector3)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3(
    Vector3 row0,
    Vector3 row1,
    Vector3 row2
)

Parameters

row0
Type: DualityVector3
Top row of the matrix
row1
Type: DualityVector3
Second row of the matrix
row2
Type: DualityVector3
Bottom row of the matrix
See Also

Reference

Matrix3 Structure
Matrix3 Overload
Duality Namespace


Matrix3 Constructor (Single, Single, Single, Single, Single, Single, Single, Single, Single)

Matrix3 Constructor (Single, Single, Single, Single, Single, Single, Single, Single, Single)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3(
    float m00,
    float m01,
    float m02,
    float m10,
    float m11,
    float m12,
    float m20,
    float m21,
    float m22
)

Parameters

m00
Type: SystemSingle
First item of the first row of the matrix.
m01
Type: SystemSingle
Second item of the first row of the matrix.
m02
Type: SystemSingle
Third item of the first row of the matrix.
m10
Type: SystemSingle
First item of the second row of the matrix.
m11
Type: SystemSingle
Second item of the second row of the matrix.
m12
Type: SystemSingle
Third item of the second row of the matrix.
m20
Type: SystemSingle
First item of the third row of the matrix.
m21
Type: SystemSingle
Second item of the third row of the matrix.
m22
Type: SystemSingle
Third item of the third row of the matrix.
See Also

Reference

Matrix3 Structure
Matrix3 Overload
Duality Namespace


Matrix3 Fields

Matrix3 Fields

The Matrix3 type exposes the following members.

Fields
 | Name | Description
 | Identity | The identity matrix.
Public field | Row0 | First row of the matrix.
Public field | Row1 | Second row of the matrix.
Public field | Row2 | Third row of the matrix.
 | Zero | The zero matrix.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Identity Field

Matrix3Identity Field
The identity matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Matrix3 Identity

Field Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Row0 Field

Matrix3Row0 Field
First row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Row0

Field Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Row1 Field

Matrix3Row1 Field
Second row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Row1

Field Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Row2 Field

Matrix3Row2 Field
Third row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Row2

Field Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Zero Field

Matrix3Zero Field
The zero matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Matrix3 Zero

Field Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3 Methods

Matrix3 Methods

The Matrix3 type exposes the following members.

Methods
 | Name | Description
Public method | ClearRotation | Returns a copy of this Matrix3 without rotation.
Public method | ClearScale | Returns a copy of this Matrix3 without scale.
 | CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromAxisAngle(Vector3, Single, Matrix3) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromQuaternion(Quaternion) | Build a rotation matrix from the specified quaternion.
 | CreateFromQuaternion(Quaternion, Matrix3) | Build a rotation matrix from the specified quaternion.
 | CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationX(Single, Matrix3) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationY(Single, Matrix3) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateRotationZ(Single, Matrix3) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateScale(Single) | Creates a scale matrix.
 | CreateScale(Vector3) | Creates a scale matrix.
 | CreateScale(Single, Matrix3) | Creates a scale matrix.
 | CreateScale(Vector3, Matrix3) | Creates a scale matrix.
 | CreateScale(Single, Single, Single) | Creates a scale matrix.
 | CreateScale(Single, Single, Single, Matrix3) | Creates a scale matrix.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix3) | Indicates whether the current matrix is equal to another matrix.
Public method | ExtractRotation | Returns the rotation component of this instance. Quite slow.
Public method | ExtractScale | Returns the scale component of this instance.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix3) | Calculate the inverse of the given matrix
 | Invert(Matrix3, Matrix3) | Calculate the inverse of the given matrix
Public method | Inverted | Returns an inverted copy of this instance.
 | Mult(Matrix3, Matrix3) | Multiplies two instances.
 | Mult(Matrix3, Matrix3, Matrix3) | Multiplies two instances.
Public method | Normalize | Divides each element in the Matrix by the Determinant.
Public method | Normalized | Returns a normalised copy of this instance.
Public method | ToString | Returns a System.String that represents the current Matrix3d. (Overrides ValueTypeToString.)
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix3) | Calculate the transpose of the given matrix
 | Transpose(Matrix3, Matrix3) | Calculate the transpose of the given matrix
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.ClearRotation Method

Matrix3ClearRotation Method
Returns a copy of this Matrix3 without rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3 ClearRotation()

Return Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.ClearScale Method

Matrix3ClearScale Method
Returns a copy of this Matrix3 without scale.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3 ClearScale()

Return Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateFromAxisAngle Method

Matrix3CreateFromAxisAngle Method
Overload List
Name | Description
CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
CreateFromAxisAngle(Vector3, Single, Matrix3) | Build a rotation matrix from the specified axis/angle rotation.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateFromAxisAngle Method (Vector3, Single)

Matrix3CreateFromAxisAngle Method (Vector3, Single)
Build a rotation matrix from the specified axis/angle rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateFromAxisAngle(
    Vector3 axis,
    float angle
)

Parameters

axis
Type: DualityVector3
The axis to rotate about.
angle
Type: SystemSingle
Angle in radians to rotate counter-clockwise (looking in the direction of the given axis).

Return Value

Type: Matrix3
A matrix instance.
See Also

Reference

Matrix3 Structure
CreateFromAxisAngle Overload
Duality Namespace


Matrix3.CreateFromAxisAngle Method (Vector3, Single, Matrix3)

Matrix3CreateFromAxisAngle Method (Vector3, Single, Matrix3)
Build a rotation matrix from the specified axis/angle rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateFromAxisAngle(
    Vector3 axis,
    float angle,
    out Matrix3 result
)

Parameters

axis
Type: DualityVector3
The axis to rotate about.
angle
Type: SystemSingle
Angle in radians to rotate counter-clockwise (looking in the direction of the given axis).
result
Type: DualityMatrix3
A matrix instance.
See Also

Reference

Matrix3 Structure
CreateFromAxisAngle Overload
Duality Namespace


Matrix3.CreateFromQuaternion Method

Matrix3CreateFromQuaternion Method
Overload List
Name | Description
CreateFromQuaternion(Quaternion) | Build a rotation matrix from the specified quaternion.
CreateFromQuaternion(Quaternion, Matrix3) | Build a rotation matrix from the specified quaternion.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateFromQuaternion Method (Quaternion)

Matrix3CreateFromQuaternion Method (Quaternion)
Build a rotation matrix from the specified quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateFromQuaternion(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
Quaternion to translate.

Return Value

Type: Matrix3
A matrix instance.
See Also

Reference

Matrix3 Structure
CreateFromQuaternion Overload
Duality Namespace


Matrix3.CreateFromQuaternion Method (Quaternion, Matrix3)

Matrix3CreateFromQuaternion Method (Quaternion, Matrix3)
Build a rotation matrix from the specified quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateFromQuaternion(
    ref Quaternion q,
    out Matrix3 result
)

Parameters

q
Type: DualityQuaternion
Quaternion to translate.
result
Type: DualityMatrix3
Matrix result.
See Also

Reference

Matrix3 Structure
CreateFromQuaternion Overload
Duality Namespace


Matrix3.CreateRotationX Method

Matrix3CreateRotationX Method
Overload List
Name | Description
CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
CreateRotationX(Single, Matrix3) | Builds a rotation matrix for a rotation around the x-axis.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateRotationX Method (Single)

Matrix3CreateRotationX Method (Single)
Builds a rotation matrix for a rotation around the x-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateRotationX(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationX Overload
Duality Namespace


Matrix3.CreateRotationX Method (Single, Matrix3)

Matrix3CreateRotationX Method (Single, Matrix3)
Builds a rotation matrix for a rotation around the x-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationX(
    float angle,
    out Matrix3 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationX Overload
Duality Namespace


Matrix3.CreateRotationY Method

Matrix3CreateRotationY Method
Overload List
Name | Description
CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
CreateRotationY(Single, Matrix3) | Builds a rotation matrix for a rotation around the y-axis.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateRotationY Method (Single)

Matrix3CreateRotationY Method (Single)
Builds a rotation matrix for a rotation around the y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateRotationY(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationY Overload
Duality Namespace


Matrix3.CreateRotationY Method (Single, Matrix3)

Matrix3CreateRotationY Method (Single, Matrix3)
Builds a rotation matrix for a rotation around the y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationY(
    float angle,
    out Matrix3 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationY Overload
Duality Namespace


Matrix3.CreateRotationZ Method

Matrix3CreateRotationZ Method
Overload List
Name | Description
CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
CreateRotationZ(Single, Matrix3) | Builds a rotation matrix for a rotation around the z-axis.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateRotationZ Method (Single)

Matrix3CreateRotationZ Method (Single)
Builds a rotation matrix for a rotation around the z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateRotationZ(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationZ Overload
Duality Namespace


Matrix3.CreateRotationZ Method (Single, Matrix3)

Matrix3CreateRotationZ Method (Single, Matrix3)
Builds a rotation matrix for a rotation around the z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationZ(
    float angle,
    out Matrix3 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix3
The resulting Matrix3 instance.
See Also

Reference

Matrix3 Structure
CreateRotationZ Overload
Duality Namespace


Matrix3.CreateScale Method

Matrix3CreateScale Method
Overload List
Name | Description
CreateScale(Single) | Creates a scale matrix.
CreateScale(Vector3) | Creates a scale matrix.
CreateScale(Single, Matrix3) | Creates a scale matrix.
CreateScale(Vector3, Matrix3) | Creates a scale matrix.
CreateScale(Single, Single, Single) | Creates a scale matrix.
CreateScale(Single, Single, Single, Matrix3) | Creates a scale matrix.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.CreateScale Method (Single)

Matrix3CreateScale Method (Single)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateScale(
    float scale
)

Parameters

scale
Type: SystemSingle
Single scale factor for the x, y, and z axes.

Return Value

Type: Matrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.CreateScale Method (Vector3)

Matrix3CreateScale Method (Vector3)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateScale(
    Vector3 scale
)

Parameters

scale
Type: DualityVector3
Scale factors for the x, y, and z axes.

Return Value

Type: Matrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.CreateScale Method (Single, Matrix3)

Matrix3CreateScale Method (Single, Matrix3)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    float scale,
    out Matrix3 result
)

Parameters

scale
Type: SystemSingle
Single scale factor for the x, y, and z axes.
result
Type: DualityMatrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.CreateScale Method (Vector3, Matrix3)

Matrix3CreateScale Method (Vector3, Matrix3)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    ref Vector3 scale,
    out Matrix3 result
)

Parameters

scale
Type: DualityVector3
Scale factors for the x, y, and z axes.
result
Type: DualityMatrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.CreateScale Method (Single, Single, Single)

Matrix3CreateScale Method (Single, Single, Single)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 CreateScale(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
Scale factor for the x axis.
y
Type: SystemSingle
Scale factor for the y axis.
z
Type: SystemSingle
Scale factor for the z axis.

Return Value

Type: Matrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.CreateScale Method (Single, Single, Single, Matrix3)

Matrix3CreateScale Method (Single, Single, Single, Matrix3)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    float x,
    float y,
    float z,
    out Matrix3 result
)

Parameters

x
Type: SystemSingle
Scale factor for the x axis.
y
Type: SystemSingle
Scale factor for the y axis.
z
Type: SystemSingle
Scale factor for the z axis.
result
Type: DualityMatrix3
A scale matrix.
See Also

Reference

Matrix3 Structure
CreateScale Overload
Duality Namespace


Matrix3.Equals Method

Matrix3Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix3) | Indicates whether the current matrix is equal to another matrix.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Equals Method (Object)

Matrix3Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare to.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Matrix3 Structure
Equals Overload
Duality Namespace


Matrix3.Equals Method (Matrix3)

Matrix3Equals Method (Matrix3)
Indicates whether the current matrix is equal to another matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Matrix3 other
)

Parameters

other
Type: DualityMatrix3
A matrix to compare with this matrix.

Return Value

Type: Boolean
true if the current matrix is equal to the matrix parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Matrix3 Structure
Equals Overload
Duality Namespace


Matrix3.ExtractRotation Method

Matrix3ExtractRotation Method
Returns the rotation component of this instance. Quite slow.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion ExtractRotation(
    bool row_normalise = true
)

Parameters

row_normalise (Optional)
Type: SystemBoolean
Whether the method should row-normalise (i.e. remove scale from) the Matrix. Pass false if you know it's already normalised.

Return Value

Type: Quaternion
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.ExtractScale Method

Matrix3ExtractScale Method
Returns the scale component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 ExtractScale()

Return Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.GetHashCode Method

Matrix3GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Invert Method

Matrix3Invert Method
Overload List
 | Name | Description
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix3) | Calculate the inverse of the given matrix
 | Invert(Matrix3, Matrix3) | Calculate the inverse of the given matrix
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Invert Method

Matrix3Invert Method
Converts this instance into its inverse.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Invert()
See Also

Reference

Matrix3 Structure
Invert Overload
Duality Namespace


Matrix3.Invert Method (Matrix3)

Matrix3Invert Method (Matrix3)
Calculate the inverse of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 Invert(
    Matrix3 mat
)

Parameters

mat
Type: DualityMatrix3
The matrix to invert

Return Value

Type: Matrix3
The inverse of the given matrix if it has one, or the input if it is singular
Exceptions
Exception | Condition
InvalidOperationException | Thrown if the Matrix4 is singular.
See Also

Reference

Matrix3 Structure
Invert Overload
Duality Namespace


Matrix3.Invert Method (Matrix3, Matrix3)

Matrix3Invert Method (Matrix3, Matrix3)
Calculate the inverse of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Invert(
    ref Matrix3 mat,
    out Matrix3 result
)

Parameters

mat
Type: DualityMatrix3
The matrix to invert
result
Type: DualityMatrix3
The inverse of the given matrix if it has one, or the input if it is singular
Exceptions
Exception | Condition
InvalidOperationException | Thrown if the Matrix3 is singular.
See Also

Reference

Matrix3 Structure
Invert Overload
Duality Namespace


Matrix3.Inverted Method

Matrix3Inverted Method
Returns an inverted copy of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3 Inverted()

Return Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Mult Method

Matrix3Mult Method
Overload List
Name | Description
Mult(Matrix3, Matrix3) | Multiplies two instances.
Mult(Matrix3, Matrix3, Matrix3) | Multiplies two instances.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Mult Method (Matrix3, Matrix3)

Matrix3Mult Method (Matrix3, Matrix3)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 Mult(
    Matrix3 left,
    Matrix3 right
)

Parameters

left
Type: DualityMatrix3
The left operand of the multiplication.
right
Type: DualityMatrix3
The right operand of the multiplication.

Return Value

Type: Matrix3
A new instance that is the result of the multiplication
See Also

Reference

Matrix3 Structure
Mult Overload
Duality Namespace


Matrix3.Mult Method (Matrix3, Matrix3, Matrix3)

Matrix3Mult Method (Matrix3, Matrix3, Matrix3)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Mult(
    ref Matrix3 left,
    ref Matrix3 right,
    out Matrix3 result
)

Parameters

left
Type: DualityMatrix3
The left operand of the multiplication.
right
Type: DualityMatrix3
The right operand of the multiplication.
result
Type: DualityMatrix3
A new instance that is the result of the multiplication
See Also

Reference

Matrix3 Structure
Mult Overload
Duality Namespace


Matrix3.Normalize Method

Matrix3Normalize Method
Divides each element in the Matrix by the Determinant.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Normalized Method

Matrix3Normalized Method
Returns a normalised copy of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix3 Normalized()

Return Value

Type: Matrix3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.ToString Method

Matrix3ToString Method
Returns a System.String that represents the current Matrix3d.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
The string representation of the matrix.
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Transpose Method

Matrix3Transpose Method
Overload List
 | Name | Description
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix3) | Calculate the transpose of the given matrix
 | Transpose(Matrix3, Matrix3) | Calculate the transpose of the given matrix
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Transpose Method

Matrix3Transpose Method
Converts this instance into its transpose.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Transpose()
See Also

Reference

Matrix3 Structure
Transpose Overload
Duality Namespace


Matrix3.Transpose Method (Matrix3)

Matrix3Transpose Method (Matrix3)
Calculate the transpose of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 Transpose(
    Matrix3 mat
)

Parameters

mat
Type: DualityMatrix3
The matrix to transpose

Return Value

Type: Matrix3
The transpose of the given matrix
See Also

Reference

Matrix3 Structure
Transpose Overload
Duality Namespace


Matrix3.Transpose Method (Matrix3, Matrix3)

Matrix3Transpose Method (Matrix3, Matrix3)
Calculate the transpose of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transpose(
    ref Matrix3 mat,
    out Matrix3 result
)

Parameters

mat
Type: DualityMatrix3
The matrix to transpose
result
Type: DualityMatrix3
The result of the calculation
See Also

Reference

Matrix3 Structure
Transpose Overload
Duality Namespace


Matrix3 Operators

Matrix3 Operators

The Matrix3 type exposes the following members.

Operators
Name | Description
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply | Matrix multiplication
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Equality Operator

Matrix3Equality Operator
Compares two instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Matrix3 left,
    Matrix3 right
)

Parameters

left
Type: DualityMatrix3
The first instance.
right
Type: DualityMatrix3
The second instance.

Return Value

Type: Boolean
True, if left equals right; false otherwise.
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Inequality Operator

Matrix3Inequality Operator
Compares two instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Matrix3 left,
    Matrix3 right
)

Parameters

left
Type: DualityMatrix3
The first instance.
right
Type: DualityMatrix3
The second instance.

Return Value

Type: Boolean
True, if left does not equal right; false otherwise.
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Multiply Operator

Matrix3Multiply Operator
Matrix multiplication

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix3 operator *(
    Matrix3 left,
    Matrix3 right
)

Parameters

left
Type: DualityMatrix3
left-hand operand
right
Type: DualityMatrix3
right-hand operand

Return Value

Type: Matrix3
A new Matrix3d which holds the result of the multiplication
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3 Properties

Matrix3 Properties

The Matrix3 type exposes the following members.

Properties
 | Name | Description
Public property | Column0 | Gets the first column of this matrix.
Public property | Column1 | Gets the second column of this matrix.
Public property | Column2 | Gets the third column of this matrix.
Public property | Determinant | Gets the determinant of this matrix.
Public property | Diagonal | Gets or sets the values along the main diagonal of the matrix.
Public property | Item | Gets or sets the value at a specified row and column.
Public property | M11 | Gets or sets the value at row 1, column 1 of this instance.
Public property | M12 | Gets or sets the value at row 1, column 2 of this instance.
Public property | M13 | Gets or sets the value at row 1, column 3 of this instance.
Public property | M21 | Gets or sets the value at row 2, column 1 of this instance.
Public property | M22 | Gets or sets the value at row 2, column 2 of this instance.
Public property | M23 | Gets or sets the value at row 2, column 3 of this instance.
Public property | M31 | Gets or sets the value at row 3, column 1 of this instance.
Public property | M32 | Gets or sets the value at row 3, column 2 of this instance.
Public property | M33 | Gets or sets the value at row 3, column 3 of this instance.
Public property | Trace | Gets the trace of the matrix, the sum of the values along the diagonal.
Top
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Column0 Property

Matrix3Column0 Property
Gets the first column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Column0 { get; }

Property Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Column1 Property

Matrix3Column1 Property
Gets the second column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Column1 { get; }

Property Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Column2 Property

Matrix3Column2 Property
Gets the third column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Column2 { get; }

Property Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Determinant Property

Matrix3Determinant Property
Gets the determinant of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Determinant { get; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Diagonal Property

Matrix3Diagonal Property
Gets or sets the values along the main diagonal of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Diagonal { get; set; }

Property Value

Type: Vector3
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Item Property

Matrix3Item Property
Gets or sets the value at a specified row and column.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float this[
    int rowIndex,
    int columnIndex
] { get; set; }

Parameters

rowIndex
Type: SystemInt32
columnIndex
Type: SystemInt32

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M11 Property

Matrix3M11 Property
Gets or sets the value at row 1, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M11 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M12 Property

Matrix3M12 Property
Gets or sets the value at row 1, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M12 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M13 Property

Matrix3M13 Property
Gets or sets the value at row 1, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M13 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M21 Property

Matrix3M21 Property
Gets or sets the value at row 2, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M21 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M22 Property

Matrix3M22 Property
Gets or sets the value at row 2, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M22 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M23 Property

Matrix3M23 Property
Gets or sets the value at row 2, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M23 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M31 Property

Matrix3M31 Property
Gets or sets the value at row 3, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M31 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M32 Property

Matrix3M32 Property
Gets or sets the value at row 3, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M32 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.M33 Property

Matrix3M33 Property
Gets or sets the value at row 3, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M33 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix3.Trace Property

Matrix3Trace Property
Gets the trace of the matrix, the sum of the values along the diagonal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Trace { get; }

Property Value

Type: Single
See Also

Reference

Matrix3 Structure
Duality Namespace


Matrix4 Structure

Matrix4 Structure
Represents a 4x4 matrix containing 3D rotation, scale, transform, and projection.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Matrix4 : IEquatable<Matrix4>

The Matrix4 type exposes the following members.

Constructors
 | Name | Description
Public method | Matrix4(Vector4, Vector4, Vector4, Vector4) | Constructs a new instance.
Public method | Matrix4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) | Constructs a new instance.
Top
Methods
 | Name | Description
 | Add(Matrix4, Matrix4) | Adds two instances.
 | Add(Matrix4, Matrix4, Matrix4) | Adds two instances.
Public method | ClearProjection | Returns a copy of this Matrix4 without projection.
Public method | ClearRotation | Returns a copy of this Matrix4 without rotation.
Public method | ClearScale | Returns a copy of this Matrix4 without scale.
Public method | ClearTranslation | Returns a copy of this Matrix4 without translation.
 | CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromAxisAngle(Vector3, Single, Matrix4) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromQuaternion(Quaternion) | Builds a rotation matrix from a quaternion.
 | CreateFromQuaternion(Quaternion, Matrix4) | Builds a rotation matrix from a quaternion.
 | CreateOrthographic(Single, Single, Single, Single) | Creates an orthographic projection matrix.
 | CreateOrthographic(Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
 | CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) | Creates an orthographic projection matrix.
 | CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
 | CreatePerspectiveFieldOfView(Single, Single, Single, Single) | Creates a perspective projection matrix.
 | CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4) | Creates a perspective projection matrix.
 | CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) | Creates an perspective projection matrix.
 | CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an perspective projection matrix.
 | CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationX(Single, Matrix4) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationY(Single, Matrix4) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateRotationZ(Single, Matrix4) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateScale(Single) | Creates a scale matrix.
 | CreateScale(Vector3) | Creates a scale matrix.
 | CreateScale(Single, Matrix4) | Creates a scale matrix.
 | CreateScale(Vector3, Matrix4) | Creates a scale matrix.
 | CreateScale(Single, Single, Single) | Creates a scale matrix.
 | CreateScale(Single, Single, Single, Matrix4) | Creates a scale matrix.
 | CreateTranslation(Vector3) | Creates a translation matrix.
 | CreateTranslation(Vector3, Matrix4) | Creates a translation matrix.
 | CreateTranslation(Single, Single, Single) | Creates a translation matrix.
 | CreateTranslation(Single, Single, Single, Matrix4) | Creates a translation matrix.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix4) | Indicates whether the current matrix is equal to another matrix.
Public method | ExtractProjection | Returns the projection component of this instance.
Public method | ExtractRotation | Returns the rotation component of this instance. Quite slow.
Public method | ExtractScale | Returns the scale component of this instance.
Public method | ExtractTranslation | Returns the translation component of this instance.
 | Frustum | Obsolete. Build a projection matrix
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix4) | Calculate the inverse of the given matrix
 | Invert(Matrix4, Matrix4) | Calculate the inverse of the given matrix
Public method | Inverted | Returns an inverted copy of this instance.
 | LookAt(Vector3, Vector3, Vector3) | Build a world space to camera space matrix
 | LookAt(Single, Single, Single, Single, Single, Single, Single, Single, Single) | Build a world space to camera space matrix
 | Mult(Matrix4, Matrix4) | Multiplies two instances.
 | Mult(Matrix4, Single) | Multiplies an instance by a scalar.
 | Mult(Matrix4, Matrix4, Matrix4) | Multiplies two instances.
 | Mult(Matrix4, Single, Matrix4) | Multiplies an instance by a scalar.
Public method | Normalize | Divides each element in the Matrix by the Determinant.
Public method | Normalized | Returns a normalised copy of this instance.
 | Perspective | Obsolete. Build a projection matrix
 | Rotate(Quaternion) | Obsolete. Build a rotation matrix from a quaternion
 | Rotate(Vector3, Single) | Obsolete. Build a rotation matrix to rotate about the given axis
 | RotateX | Obsolete. Build a rotation matrix that rotates about the x-axis
 | RotateY | Obsolete. Build a rotation matrix that rotates about the y-axis
 | RotateZ | Obsolete. Build a rotation matrix that rotates about the z-axis
 | Scale(Single) | Obsolete. Build a scaling matrix
 | Scale(Vector3) | Obsolete. Build a scaling matrix
 | Scale(Single, Single, Single) | Obsolete. Build a scaling matrix
 | Subtract(Matrix4, Matrix4) | Subtracts one instance from another.
 | Subtract(Matrix4, Matrix4, Matrix4) | Subtracts one instance from another.
Public method | ToString | Returns a System.String that represents the current Matrix4. (Overrides ValueTypeToString.)
 | Translation(Vector3) | Obsolete. Builds a translation matrix.
 | Translation(Single, Single, Single) | Obsolete. Build a translation matrix with the given translation
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix4) | Calculate the transpose of the given matrix
 | Transpose(Matrix4, Matrix4) | Calculate the transpose of the given matrix
Top
Operators
Name | Description
Addition | Matrix addition
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Matrix4, Matrix4) | Matrix multiplication
Multiply(Matrix4, Single) | Matrix-scalar multiplication
Subtraction | Matrix subtraction
Top
Fields
 | Name | Description
 | Identity | The identity matrix.
Public field | Row0 | Top row of the matrix.
Public field | Row1 | 2nd row of the matrix.
Public field | Row2 | 3rd row of the matrix.
Public field | Row3 | Bottom row of the matrix.
 | Zero | The zero matrix.
Top
Properties
 | Name | Description
Public property | Column0 | Gets the first column of this matrix.
Public property | Column1 | Gets the second column of this matrix.
Public property | Column2 | Gets the third column of this matrix.
Public property | Column3 | Gets the fourth column of this matrix.
Public property | Determinant | Gets the determinant of this matrix.
Public property | Diagonal | Gets or sets the values along the main diagonal of the matrix.
Public property | Item | Gets or sets the value at a specified row and column.
Public property | M11 | Gets or sets the value at row 1, column 1 of this instance.
Public property | M12 | Gets or sets the value at row 1, column 2 of this instance.
Public property | M13 | Gets or sets the value at row 1, column 3 of this instance.
Public property | M14 | Gets or sets the value at row 1, column 4 of this instance.
Public property | M21 | Gets or sets the value at row 2, column 1 of this instance.
Public property | M22 | Gets or sets the value at row 2, column 2 of this instance.
Public property | M23 | Gets or sets the value at row 2, column 3 of this instance.
Public property | M24 | Gets or sets the value at row 2, column 4 of this instance.
Public property | M31 | Gets or sets the value at row 3, column 1 of this instance.
Public property | M32 | Gets or sets the value at row 3, column 2 of this instance.
Public property | M33 | Gets or sets the value at row 3, column 3 of this instance.
Public property | M34 | Gets or sets the value at row 3, column 4 of this instance.
Public property | M41 | Gets or sets the value at row 4, column 1 of this instance.
Public property | M42 | Gets or sets the value at row 4, column 2 of this instance.
Public property | M43 | Gets or sets the value at row 4, column 3 of this instance.
Public property | M44 | Gets or sets the value at row 4, column 4 of this instance.
Public property | Trace | Gets the trace of the matrix, the sum of the values along the diagonal.
Top
See Also

Reference

Duality Namespace
[!:Matrix4d]


Matrix4 Constructor

Matrix4 Constructor
Overload List
 | Name | Description
Public method | Matrix4(Vector4, Vector4, Vector4, Vector4) | Constructs a new instance.
Public method | Matrix4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) | Constructs a new instance.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4 Constructor (Vector4, Vector4, Vector4, Vector4)

Matrix4 Constructor (Vector4, Vector4, Vector4, Vector4)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4(
    Vector4 row0,
    Vector4 row1,
    Vector4 row2,
    Vector4 row3
)

Parameters

row0
Type: DualityVector4
Top row of the matrix.
row1
Type: DualityVector4
Second row of the matrix.
row2
Type: DualityVector4
Third row of the matrix.
row3
Type: DualityVector4
Bottom row of the matrix.
See Also

Reference

Matrix4 Structure
Matrix4 Overload
Duality Namespace


Matrix4 Constructor (Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single)

Matrix4 Constructor (Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4(
    float m00,
    float m01,
    float m02,
    float m03,
    float m10,
    float m11,
    float m12,
    float m13,
    float m20,
    float m21,
    float m22,
    float m23,
    float m30,
    float m31,
    float m32,
    float m33
)

Parameters

m00
Type: SystemSingle
First item of the first row of the matrix.
m01
Type: SystemSingle
Second item of the first row of the matrix.
m02
Type: SystemSingle
Third item of the first row of the matrix.
m03
Type: SystemSingle
Fourth item of the first row of the matrix.
m10
Type: SystemSingle
First item of the second row of the matrix.
m11
Type: SystemSingle
Second item of the second row of the matrix.
m12
Type: SystemSingle
Third item of the second row of the matrix.
m13
Type: SystemSingle
Fourth item of the second row of the matrix.
m20
Type: SystemSingle
First item of the third row of the matrix.
m21
Type: SystemSingle
Second item of the third row of the matrix.
m22
Type: SystemSingle
Third item of the third row of the matrix.
m23
Type: SystemSingle
First item of the third row of the matrix.
m30
Type: SystemSingle
Fourth item of the fourth row of the matrix.
m31
Type: SystemSingle
Second item of the fourth row of the matrix.
m32
Type: SystemSingle
Third item of the fourth row of the matrix.
m33
Type: SystemSingle
Fourth item of the fourth row of the matrix.
See Also

Reference

Matrix4 Structure
Matrix4 Overload
Duality Namespace


Matrix4 Fields

Matrix4 Fields

The Matrix4 type exposes the following members.

Fields
 | Name | Description
 | Identity | The identity matrix.
Public field | Row0 | Top row of the matrix.
Public field | Row1 | 2nd row of the matrix.
Public field | Row2 | 3rd row of the matrix.
Public field | Row3 | Bottom row of the matrix.
 | Zero | The zero matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Identity Field

Matrix4Identity Field
The identity matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Matrix4 Identity

Field Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Row0 Field

Matrix4Row0 Field
Top row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Row0

Field Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Row1 Field

Matrix4Row1 Field
2nd row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Row1

Field Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Row2 Field

Matrix4Row2 Field
3rd row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Row2

Field Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Row3 Field

Matrix4Row3 Field
Bottom row of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Row3

Field Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Zero Field

Matrix4Zero Field
The zero matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Matrix4 Zero

Field Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4 Methods

Matrix4 Methods

The Matrix4 type exposes the following members.

Methods
 | Name | Description
 | Add(Matrix4, Matrix4) | Adds two instances.
 | Add(Matrix4, Matrix4, Matrix4) | Adds two instances.
Public method | ClearProjection | Returns a copy of this Matrix4 without projection.
Public method | ClearRotation | Returns a copy of this Matrix4 without rotation.
Public method | ClearScale | Returns a copy of this Matrix4 without scale.
Public method | ClearTranslation | Returns a copy of this Matrix4 without translation.
 | CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromAxisAngle(Vector3, Single, Matrix4) | Build a rotation matrix from the specified axis/angle rotation.
 | CreateFromQuaternion(Quaternion) | Builds a rotation matrix from a quaternion.
 | CreateFromQuaternion(Quaternion, Matrix4) | Builds a rotation matrix from a quaternion.
 | CreateOrthographic(Single, Single, Single, Single) | Creates an orthographic projection matrix.
 | CreateOrthographic(Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
 | CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) | Creates an orthographic projection matrix.
 | CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
 | CreatePerspectiveFieldOfView(Single, Single, Single, Single) | Creates a perspective projection matrix.
 | CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4) | Creates a perspective projection matrix.
 | CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) | Creates an perspective projection matrix.
 | CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an perspective projection matrix.
 | CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationX(Single, Matrix4) | Builds a rotation matrix for a rotation around the x-axis.
 | CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationY(Single, Matrix4) | Builds a rotation matrix for a rotation around the y-axis.
 | CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateRotationZ(Single, Matrix4) | Builds a rotation matrix for a rotation around the z-axis.
 | CreateScale(Single) | Creates a scale matrix.
 | CreateScale(Vector3) | Creates a scale matrix.
 | CreateScale(Single, Matrix4) | Creates a scale matrix.
 | CreateScale(Vector3, Matrix4) | Creates a scale matrix.
 | CreateScale(Single, Single, Single) | Creates a scale matrix.
 | CreateScale(Single, Single, Single, Matrix4) | Creates a scale matrix.
 | CreateTranslation(Vector3) | Creates a translation matrix.
 | CreateTranslation(Vector3, Matrix4) | Creates a translation matrix.
 | CreateTranslation(Single, Single, Single) | Creates a translation matrix.
 | CreateTranslation(Single, Single, Single, Matrix4) | Creates a translation matrix.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix4) | Indicates whether the current matrix is equal to another matrix.
Public method | ExtractProjection | Returns the projection component of this instance.
Public method | ExtractRotation | Returns the rotation component of this instance. Quite slow.
Public method | ExtractScale | Returns the scale component of this instance.
Public method | ExtractTranslation | Returns the translation component of this instance.
 | Frustum | Obsolete. Build a projection matrix
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix4) | Calculate the inverse of the given matrix
 | Invert(Matrix4, Matrix4) | Calculate the inverse of the given matrix
Public method | Inverted | Returns an inverted copy of this instance.
 | LookAt(Vector3, Vector3, Vector3) | Build a world space to camera space matrix
 | LookAt(Single, Single, Single, Single, Single, Single, Single, Single, Single) | Build a world space to camera space matrix
 | Mult(Matrix4, Matrix4) | Multiplies two instances.
 | Mult(Matrix4, Single) | Multiplies an instance by a scalar.
 | Mult(Matrix4, Matrix4, Matrix4) | Multiplies two instances.
 | Mult(Matrix4, Single, Matrix4) | Multiplies an instance by a scalar.
Public method | Normalize | Divides each element in the Matrix by the Determinant.
Public method | Normalized | Returns a normalised copy of this instance.
 | Perspective | Obsolete. Build a projection matrix
 | Rotate(Quaternion) | Obsolete. Build a rotation matrix from a quaternion
 | Rotate(Vector3, Single) | Obsolete. Build a rotation matrix to rotate about the given axis
 | RotateX | Obsolete. Build a rotation matrix that rotates about the x-axis
 | RotateY | Obsolete. Build a rotation matrix that rotates about the y-axis
 | RotateZ | Obsolete. Build a rotation matrix that rotates about the z-axis
 | Scale(Single) | Obsolete. Build a scaling matrix
 | Scale(Vector3) | Obsolete. Build a scaling matrix
 | Scale(Single, Single, Single) | Obsolete. Build a scaling matrix
 | Subtract(Matrix4, Matrix4) | Subtracts one instance from another.
 | Subtract(Matrix4, Matrix4, Matrix4) | Subtracts one instance from another.
Public method | ToString | Returns a System.String that represents the current Matrix4. (Overrides ValueTypeToString.)
 | Translation(Vector3) | Obsolete. Builds a translation matrix.
 | Translation(Single, Single, Single) | Obsolete. Build a translation matrix with the given translation
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix4) | Calculate the transpose of the given matrix
 | Transpose(Matrix4, Matrix4) | Calculate the transpose of the given matrix
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Add Method

Matrix4Add Method
Overload List
Name | Description
Add(Matrix4, Matrix4) | Adds two instances.
Add(Matrix4, Matrix4, Matrix4) | Adds two instances.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Add Method (Matrix4, Matrix4)

Matrix4Add Method (Matrix4, Matrix4)
Adds two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Add(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
The left operand of the addition.
right
Type: DualityMatrix4
The right operand of the addition.

Return Value

Type: Matrix4
A new instance that is the result of the addition.
See Also

Reference

Matrix4 Structure
Add Overload
Duality Namespace


Matrix4.Add Method (Matrix4, Matrix4, Matrix4)

Matrix4Add Method (Matrix4, Matrix4, Matrix4)
Adds two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref Matrix4 left,
    ref Matrix4 right,
    out Matrix4 result
)

Parameters

left
Type: DualityMatrix4
The left operand of the addition.
right
Type: DualityMatrix4
The right operand of the addition.
result
Type: DualityMatrix4
A new instance that is the result of the addition.
See Also

Reference

Matrix4 Structure
Add Overload
Duality Namespace


Matrix4.ClearProjection Method

Matrix4ClearProjection Method
Returns a copy of this Matrix4 without projection.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 ClearProjection()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ClearRotation Method

Matrix4ClearRotation Method
Returns a copy of this Matrix4 without rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 ClearRotation()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ClearScale Method

Matrix4ClearScale Method
Returns a copy of this Matrix4 without scale.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 ClearScale()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ClearTranslation Method

Matrix4ClearTranslation Method
Returns a copy of this Matrix4 without translation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 ClearTranslation()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateFromAxisAngle Method

Matrix4CreateFromAxisAngle Method
Overload List
Name | Description
CreateFromAxisAngle(Vector3, Single) | Build a rotation matrix from the specified axis/angle rotation.
CreateFromAxisAngle(Vector3, Single, Matrix4) | Build a rotation matrix from the specified axis/angle rotation.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateFromAxisAngle Method (Vector3, Single)

Matrix4CreateFromAxisAngle Method (Vector3, Single)
Build a rotation matrix from the specified axis/angle rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateFromAxisAngle(
    Vector3 axis,
    float angle
)

Parameters

axis
Type: DualityVector3
The axis to rotate about.
angle
Type: SystemSingle
Angle in radians to rotate counter-clockwise (looking in the direction of the given axis).

Return Value

Type: Matrix4
A matrix instance.
See Also

Reference

Matrix4 Structure
CreateFromAxisAngle Overload
Duality Namespace


Matrix4.CreateFromAxisAngle Method (Vector3, Single, Matrix4)

Matrix4CreateFromAxisAngle Method (Vector3, Single, Matrix4)
Build a rotation matrix from the specified axis/angle rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateFromAxisAngle(
    Vector3 axis,
    float angle,
    out Matrix4 result
)

Parameters

axis
Type: DualityVector3
The axis to rotate about.
angle
Type: SystemSingle
Angle in radians to rotate counter-clockwise (looking in the direction of the given axis).
result
Type: DualityMatrix4
A matrix instance.
See Also

Reference

Matrix4 Structure
CreateFromAxisAngle Overload
Duality Namespace


Matrix4.CreateFromQuaternion Method

Matrix4CreateFromQuaternion Method
Overload List
Name | Description
CreateFromQuaternion(Quaternion) | Builds a rotation matrix from a quaternion.
CreateFromQuaternion(Quaternion, Matrix4) | Builds a rotation matrix from a quaternion.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateFromQuaternion Method (Quaternion)

Matrix4CreateFromQuaternion Method (Quaternion)
Builds a rotation matrix from a quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateFromQuaternion(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
The quaternion to rotate by.

Return Value

Type: Matrix4
A matrix instance.
See Also

Reference

Matrix4 Structure
CreateFromQuaternion Overload
Duality Namespace


Matrix4.CreateFromQuaternion Method (Quaternion, Matrix4)

Matrix4CreateFromQuaternion Method (Quaternion, Matrix4)
Builds a rotation matrix from a quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateFromQuaternion(
    ref Quaternion q,
    out Matrix4 result
)

Parameters

q
Type: DualityQuaternion
The quaternion to rotate by.
result
Type: DualityMatrix4
A matrix instance.
See Also

Reference

Matrix4 Structure
CreateFromQuaternion Overload
Duality Namespace


Matrix4.CreateOrthographic Method

Matrix4CreateOrthographic Method
Overload List
Name | Description
CreateOrthographic(Single, Single, Single, Single) | Creates an orthographic projection matrix.
CreateOrthographic(Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateOrthographic Method (Single, Single, Single, Single)

Matrix4CreateOrthographic Method (Single, Single, Single, Single)
Creates an orthographic projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateOrthographic(
    float width,
    float height,
    float zNear,
    float zFar
)

Parameters

width
Type: SystemSingle
The width of the projection volume.
height
Type: SystemSingle
The height of the projection volume.
zNear
Type: SystemSingle
The near edge of the projection volume.
zFar
Type: SystemSingle
The far edge of the projection volume.

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
CreateOrthographic Overload
Duality Namespace


Matrix4.CreateOrthographic Method (Single, Single, Single, Single, Matrix4)

Matrix4CreateOrthographic Method (Single, Single, Single, Single, Matrix4)
Creates an orthographic projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateOrthographic(
    float width,
    float height,
    float zNear,
    float zFar,
    out Matrix4 result
)

Parameters

width
Type: SystemSingle
The width of the projection volume.
height
Type: SystemSingle
The height of the projection volume.
zNear
Type: SystemSingle
The near edge of the projection volume.
zFar
Type: SystemSingle
The far edge of the projection volume.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateOrthographic Overload
Duality Namespace


Matrix4.CreateOrthographicOffCenter Method

Matrix4CreateOrthographicOffCenter Method
Overload List
Name | Description
CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) | Creates an orthographic projection matrix.
CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an orthographic projection matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateOrthographicOffCenter Method (Single, Single, Single, Single, Single, Single)

Matrix4CreateOrthographicOffCenter Method (Single, Single, Single, Single, Single, Single)
Creates an orthographic projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateOrthographicOffCenter(
    float left,
    float right,
    float bottom,
    float top,
    float zNear,
    float zFar
)

Parameters

left
Type: SystemSingle
The left edge of the projection volume.
right
Type: SystemSingle
The right edge of the projection volume.
bottom
Type: SystemSingle
The bottom edge of the projection volume.
top
Type: SystemSingle
The top edge of the projection volume.
zNear
Type: SystemSingle
The near edge of the projection volume.
zFar
Type: SystemSingle
The far edge of the projection volume.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateOrthographicOffCenter Overload
Duality Namespace


Matrix4.CreateOrthographicOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix4)

Matrix4CreateOrthographicOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix4)
Creates an orthographic projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateOrthographicOffCenter(
    float left,
    float right,
    float bottom,
    float top,
    float zNear,
    float zFar,
    out Matrix4 result
)

Parameters

left
Type: SystemSingle
The left edge of the projection volume.
right
Type: SystemSingle
The right edge of the projection volume.
bottom
Type: SystemSingle
The bottom edge of the projection volume.
top
Type: SystemSingle
The top edge of the projection volume.
zNear
Type: SystemSingle
The near edge of the projection volume.
zFar
Type: SystemSingle
The far edge of the projection volume.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateOrthographicOffCenter Overload
Duality Namespace


Matrix4.CreatePerspectiveFieldOfView Method

Matrix4CreatePerspectiveFieldOfView Method
Overload List
Name | Description
CreatePerspectiveFieldOfView(Single, Single, Single, Single) | Creates a perspective projection matrix.
CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4) | Creates a perspective projection matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreatePerspectiveFieldOfView Method (Single, Single, Single, Single)

Matrix4CreatePerspectiveFieldOfView Method (Single, Single, Single, Single)
Creates a perspective projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreatePerspectiveFieldOfView(
    float fovy,
    float aspect,
    float zNear,
    float zFar
)

Parameters

fovy
Type: SystemSingle
Angle of the field of view in the y direction (in radians)
aspect
Type: SystemSingle
Aspect ratio of the view (width / height)
zNear
Type: SystemSingle
Distance to the near clip plane
zFar
Type: SystemSingle
Distance to the far clip plane

Return Value

Type: Matrix4
A projection matrix that transforms camera space to raster space
Exceptions
Exception Condition
ArgumentOutOfRangeException Thrown under the following conditions:
  • fovy is zero, less than zero or larger than Math.PI
  • aspect is negative or zero
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
See Also

Reference

Matrix4 Structure
CreatePerspectiveFieldOfView Overload
Duality Namespace


Matrix4.CreatePerspectiveFieldOfView Method (Single, Single, Single, Single, Matrix4)

Matrix4CreatePerspectiveFieldOfView Method (Single, Single, Single, Single, Matrix4)
Creates a perspective projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreatePerspectiveFieldOfView(
    float fovy,
    float aspect,
    float zNear,
    float zFar,
    out Matrix4 result
)

Parameters

fovy
Type: SystemSingle
Angle of the field of view in the y direction (in radians)
aspect
Type: SystemSingle
Aspect ratio of the view (width / height)
zNear
Type: SystemSingle
Distance to the near clip plane
zFar
Type: SystemSingle
Distance to the far clip plane
result
Type: DualityMatrix4
A projection matrix that transforms camera space to raster space
Exceptions
Exception Condition
ArgumentOutOfRangeException Thrown under the following conditions:
  • fovy is zero, less than zero or larger than Math.PI
  • aspect is negative or zero
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
See Also

Reference

Matrix4 Structure
CreatePerspectiveFieldOfView Overload
Duality Namespace


Matrix4.CreatePerspectiveOffCenter Method

Matrix4CreatePerspectiveOffCenter Method
Overload List
Name | Description
CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) | Creates an perspective projection matrix.
CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single, Matrix4) | Creates an perspective projection matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single)

Matrix4CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single)
Creates an perspective projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreatePerspectiveOffCenter(
    float left,
    float right,
    float bottom,
    float top,
    float zNear,
    float zFar
)

Parameters

left
Type: SystemSingle
Left edge of the view frustum
right
Type: SystemSingle
Right edge of the view frustum
bottom
Type: SystemSingle
Bottom edge of the view frustum
top
Type: SystemSingle
Top edge of the view frustum
zNear
Type: SystemSingle
Distance to the near clip plane
zFar
Type: SystemSingle
Distance to the far clip plane

Return Value

Type: Matrix4
A projection matrix that transforms camera space to raster space
Exceptions
Exception Condition
ArgumentOutOfRangeException Thrown under the following conditions:
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
See Also

Reference

Matrix4 Structure
CreatePerspectiveOffCenter Overload
Duality Namespace


Matrix4.CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix4)

Matrix4CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix4)
Creates an perspective projection matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreatePerspectiveOffCenter(
    float left,
    float right,
    float bottom,
    float top,
    float zNear,
    float zFar,
    out Matrix4 result
)

Parameters

left
Type: SystemSingle
Left edge of the view frustum
right
Type: SystemSingle
Right edge of the view frustum
bottom
Type: SystemSingle
Bottom edge of the view frustum
top
Type: SystemSingle
Top edge of the view frustum
zNear
Type: SystemSingle
Distance to the near clip plane
zFar
Type: SystemSingle
Distance to the far clip plane
result
Type: DualityMatrix4
A projection matrix that transforms camera space to raster space
Exceptions
Exception Condition
ArgumentOutOfRangeException Thrown under the following conditions:
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
See Also

Reference

Matrix4 Structure
CreatePerspectiveOffCenter Overload
Duality Namespace


Matrix4.CreateRotationX Method

Matrix4CreateRotationX Method
Overload List
Name | Description
CreateRotationX(Single) | Builds a rotation matrix for a rotation around the x-axis.
CreateRotationX(Single, Matrix4) | Builds a rotation matrix for a rotation around the x-axis.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateRotationX Method (Single)

Matrix4CreateRotationX Method (Single)
Builds a rotation matrix for a rotation around the x-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateRotationX(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationX Overload
Duality Namespace


Matrix4.CreateRotationX Method (Single, Matrix4)

Matrix4CreateRotationX Method (Single, Matrix4)
Builds a rotation matrix for a rotation around the x-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationX(
    float angle,
    out Matrix4 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationX Overload
Duality Namespace


Matrix4.CreateRotationY Method

Matrix4CreateRotationY Method
Overload List
Name | Description
CreateRotationY(Single) | Builds a rotation matrix for a rotation around the y-axis.
CreateRotationY(Single, Matrix4) | Builds a rotation matrix for a rotation around the y-axis.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateRotationY Method (Single)

Matrix4CreateRotationY Method (Single)
Builds a rotation matrix for a rotation around the y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateRotationY(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationY Overload
Duality Namespace


Matrix4.CreateRotationY Method (Single, Matrix4)

Matrix4CreateRotationY Method (Single, Matrix4)
Builds a rotation matrix for a rotation around the y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationY(
    float angle,
    out Matrix4 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationY Overload
Duality Namespace


Matrix4.CreateRotationZ Method

Matrix4CreateRotationZ Method
Overload List
Name | Description
CreateRotationZ(Single) | Builds a rotation matrix for a rotation around the z-axis.
CreateRotationZ(Single, Matrix4) | Builds a rotation matrix for a rotation around the z-axis.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateRotationZ Method (Single)

Matrix4CreateRotationZ Method (Single)
Builds a rotation matrix for a rotation around the z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateRotationZ(
    float angle
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationZ Overload
Duality Namespace


Matrix4.CreateRotationZ Method (Single, Matrix4)

Matrix4CreateRotationZ Method (Single, Matrix4)
Builds a rotation matrix for a rotation around the z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateRotationZ(
    float angle,
    out Matrix4 result
)

Parameters

angle
Type: SystemSingle
The counter-clockwise angle in radians.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateRotationZ Overload
Duality Namespace


Matrix4.CreateScale Method

Matrix4CreateScale Method
Overload List
Name | Description
CreateScale(Single) | Creates a scale matrix.
CreateScale(Vector3) | Creates a scale matrix.
CreateScale(Single, Matrix4) | Creates a scale matrix.
CreateScale(Vector3, Matrix4) | Creates a scale matrix.
CreateScale(Single, Single, Single) | Creates a scale matrix.
CreateScale(Single, Single, Single, Matrix4) | Creates a scale matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateScale Method (Single)

Matrix4CreateScale Method (Single)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateScale(
    float scale
)

Parameters

scale
Type: SystemSingle
Single scale factor for the x, y, and z axes.

Return Value

Type: Matrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateScale Method (Vector3)

Matrix4CreateScale Method (Vector3)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateScale(
    Vector3 scale
)

Parameters

scale
Type: DualityVector3
Scale factors for the x, y, and z axes.

Return Value

Type: Matrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateScale Method (Single, Matrix4)

Matrix4CreateScale Method (Single, Matrix4)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    float scale,
    out Matrix4 result
)

Parameters

scale
Type: SystemSingle
Single scale factor for the x, y, and z axes.
result
Type: DualityMatrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateScale Method (Vector3, Matrix4)

Matrix4CreateScale Method (Vector3, Matrix4)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    ref Vector3 scale,
    out Matrix4 result
)

Parameters

scale
Type: DualityVector3
Scale factors for the x, y, and z axes.
result
Type: DualityMatrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateScale Method (Single, Single, Single)

Matrix4CreateScale Method (Single, Single, Single)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateScale(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
Scale factor for the x axis.
y
Type: SystemSingle
Scale factor for the y axis.
z
Type: SystemSingle
Scale factor for the z axis.

Return Value

Type: Matrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateScale Method (Single, Single, Single, Matrix4)

Matrix4CreateScale Method (Single, Single, Single, Matrix4)
Creates a scale matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateScale(
    float x,
    float y,
    float z,
    out Matrix4 result
)

Parameters

x
Type: SystemSingle
Scale factor for the x axis.
y
Type: SystemSingle
Scale factor for the y axis.
z
Type: SystemSingle
Scale factor for the z axis.
result
Type: DualityMatrix4
A scale matrix.
See Also

Reference

Matrix4 Structure
CreateScale Overload
Duality Namespace


Matrix4.CreateTranslation Method

Matrix4CreateTranslation Method
Overload List
Name | Description
CreateTranslation(Vector3) | Creates a translation matrix.
CreateTranslation(Vector3, Matrix4) | Creates a translation matrix.
CreateTranslation(Single, Single, Single) | Creates a translation matrix.
CreateTranslation(Single, Single, Single, Matrix4) | Creates a translation matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.CreateTranslation Method (Vector3)

Matrix4CreateTranslation Method (Vector3)
Creates a translation matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateTranslation(
    Vector3 vector
)

Parameters

vector
Type: DualityVector3
The translation vector.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateTranslation Overload
Duality Namespace


Matrix4.CreateTranslation Method (Vector3, Matrix4)

Matrix4CreateTranslation Method (Vector3, Matrix4)
Creates a translation matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateTranslation(
    ref Vector3 vector,
    out Matrix4 result
)

Parameters

vector
Type: DualityVector3
The translation vector.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateTranslation Overload
Duality Namespace


Matrix4.CreateTranslation Method (Single, Single, Single)

Matrix4CreateTranslation Method (Single, Single, Single)
Creates a translation matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 CreateTranslation(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
X translation.
y
Type: SystemSingle
Y translation.
z
Type: SystemSingle
Z translation.

Return Value

Type: Matrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateTranslation Overload
Duality Namespace


Matrix4.CreateTranslation Method (Single, Single, Single, Matrix4)

Matrix4CreateTranslation Method (Single, Single, Single, Matrix4)
Creates a translation matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void CreateTranslation(
    float x,
    float y,
    float z,
    out Matrix4 result
)

Parameters

x
Type: SystemSingle
X translation.
y
Type: SystemSingle
Y translation.
z
Type: SystemSingle
Z translation.
result
Type: DualityMatrix4
The resulting Matrix4 instance.
See Also

Reference

Matrix4 Structure
CreateTranslation Overload
Duality Namespace


Matrix4.Equals Method

Matrix4Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Matrix4) | Indicates whether the current matrix is equal to another matrix.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Equals Method (Object)

Matrix4Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare tresult.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Matrix4 Structure
Equals Overload
Duality Namespace


Matrix4.Equals Method (Matrix4)

Matrix4Equals Method (Matrix4)
Indicates whether the current matrix is equal to another matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Matrix4 other
)

Parameters

other
Type: DualityMatrix4
An matrix to compare with this matrix.

Return Value

Type: Boolean
true if the current matrix is equal to the matrix parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Matrix4 Structure
Equals Overload
Duality Namespace


Matrix4.ExtractProjection Method

Matrix4ExtractProjection Method
Returns the projection component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 ExtractProjection()

Return Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ExtractRotation Method

Matrix4ExtractRotation Method
Returns the rotation component of this instance. Quite slow.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion ExtractRotation(
    bool row_normalise = true
)

Parameters

row_normalise (Optional)
Type: SystemBoolean
Whether the method should row-normalise (i.e. remove scale from) the Matrix. Pass false if you know it's already normalised.

Return Value

Type: Quaternion
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ExtractScale Method

Matrix4ExtractScale Method
Returns the scale component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 ExtractScale()

Return Value

Type: Vector3
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.ExtractTranslation Method

Matrix4ExtractTranslation Method
Returns the translation component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 ExtractTranslation()

Return Value

Type: Vector3
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Frustum Method

Matrix4Frustum Method

Note: This API is now obsolete.

Build a projection matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreatePerspectiveOffCenter instead.")]
public static Matrix4 Frustum(
    float left,
    float right,
    float bottom,
    float top,
    float near,
    float far
)

Parameters

left
Type: SystemSingle
Left edge of the view frustum
right
Type: SystemSingle
Right edge of the view frustum
bottom
Type: SystemSingle
Bottom edge of the view frustum
top
Type: SystemSingle
Top edge of the view frustum
near
Type: SystemSingle
Distance to the near clip plane
far
Type: SystemSingle
Distance to the far clip plane

Return Value

Type: Matrix4
A projection matrix that transforms camera space to raster space
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.GetHashCode Method

Matrix4GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Invert Method

Matrix4Invert Method
Overload List
 | Name | Description
Public method | Invert | Converts this instance into its inverse.
 | Invert(Matrix4) | Calculate the inverse of the given matrix
 | Invert(Matrix4, Matrix4) | Calculate the inverse of the given matrix
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Invert Method

Matrix4Invert Method
Converts this instance into its inverse.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Invert()
See Also

Reference

Matrix4 Structure
Invert Overload
Duality Namespace


Matrix4.Invert Method (Matrix4)

Matrix4Invert Method (Matrix4)
Calculate the inverse of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Invert(
    Matrix4 mat
)

Parameters

mat
Type: DualityMatrix4
The matrix to invert

Return Value

Type: Matrix4
The inverse of the given matrix if it has one, or the input if it is singular
Exceptions
Exception | Condition
InvalidOperationException | Thrown if the Matrix4 is singular.
See Also

Reference

Matrix4 Structure
Invert Overload
Duality Namespace


Matrix4.Invert Method (Matrix4, Matrix4)

Matrix4Invert Method (Matrix4, Matrix4)
Calculate the inverse of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Invert(
    ref Matrix4 mat,
    out Matrix4 result
)

Parameters

mat
Type: DualityMatrix4
The matrix to invert
result
Type: DualityMatrix4
The inverse of the given matrix if it has one, or the input if it is singular
Exceptions
Exception | Condition
InvalidOperationException | Thrown if the Matrix4 is singular.
See Also

Reference

Matrix4 Structure
Invert Overload
Duality Namespace


Matrix4.Inverted Method

Matrix4Inverted Method
Returns an inverted copy of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 Inverted()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.LookAt Method

Matrix4LookAt Method
Overload List
Name | Description
LookAt(Vector3, Vector3, Vector3) | Build a world space to camera space matrix
LookAt(Single, Single, Single, Single, Single, Single, Single, Single, Single) | Build a world space to camera space matrix
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.LookAt Method (Vector3, Vector3, Vector3)

Matrix4LookAt Method (Vector3, Vector3, Vector3)
Build a world space to camera space matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 LookAt(
    Vector3 eye,
    Vector3 target,
    Vector3 up
)

Parameters

eye
Type: DualityVector3
Eye (camera) position in world space
target
Type: DualityVector3
Target position in world space
up
Type: DualityVector3
Up vector in world space (should not be parallel to the camera direction, that is target - eye)

Return Value

Type: Matrix4
A Matrix4 that transforms world space to camera space
See Also

Reference

Matrix4 Structure
LookAt Overload
Duality Namespace


Matrix4.LookAt Method (Single, Single, Single, Single, Single, Single, Single, Single, Single)

Matrix4LookAt Method (Single, Single, Single, Single, Single, Single, Single, Single, Single)
Build a world space to camera space matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 LookAt(
    float eyeX,
    float eyeY,
    float eyeZ,
    float targetX,
    float targetY,
    float targetZ,
    float upX,
    float upY,
    float upZ
)

Parameters

eyeX
Type: SystemSingle
Eye (camera) position in world space
eyeY
Type: SystemSingle
Eye (camera) position in world space
eyeZ
Type: SystemSingle
Eye (camera) position in world space
targetX
Type: SystemSingle
Target position in world space
targetY
Type: SystemSingle
Target position in world space
targetZ
Type: SystemSingle
Target position in world space
upX
Type: SystemSingle
Up vector in world space (should not be parallel to the camera direction, that is target - eye)
upY
Type: SystemSingle
Up vector in world space (should not be parallel to the camera direction, that is target - eye)
upZ
Type: SystemSingle
Up vector in world space (should not be parallel to the camera direction, that is target - eye)

Return Value

Type: Matrix4
A Matrix4 that transforms world space to camera space
See Also

Reference

Matrix4 Structure
LookAt Overload
Duality Namespace


Matrix4.Mult Method

Matrix4Mult Method
Overload List
Name | Description
Mult(Matrix4, Matrix4) | Multiplies two instances.
Mult(Matrix4, Single) | Multiplies an instance by a scalar.
Mult(Matrix4, Matrix4, Matrix4) | Multiplies two instances.
Mult(Matrix4, Single, Matrix4) | Multiplies an instance by a scalar.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Mult Method (Matrix4, Matrix4)

Matrix4Mult Method (Matrix4, Matrix4)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Mult(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
The left operand of the multiplication.
right
Type: DualityMatrix4
The right operand of the multiplication.

Return Value

Type: Matrix4
A new instance that is the result of the multiplication.
See Also

Reference

Matrix4 Structure
Mult Overload
Duality Namespace


Matrix4.Mult Method (Matrix4, Single)

Matrix4Mult Method (Matrix4, Single)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Mult(
    Matrix4 left,
    float right
)

Parameters

left
Type: DualityMatrix4
The left operand of the multiplication.
right
Type: SystemSingle
The right operand of the multiplication.

Return Value

Type: Matrix4
A new instance that is the result of the multiplication
See Also

Reference

Matrix4 Structure
Mult Overload
Duality Namespace


Matrix4.Mult Method (Matrix4, Matrix4, Matrix4)

Matrix4Mult Method (Matrix4, Matrix4, Matrix4)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Mult(
    ref Matrix4 left,
    ref Matrix4 right,
    out Matrix4 result
)

Parameters

left
Type: DualityMatrix4
The left operand of the multiplication.
right
Type: DualityMatrix4
The right operand of the multiplication.
result
Type: DualityMatrix4
A new instance that is the result of the multiplication.
See Also

Reference

Matrix4 Structure
Mult Overload
Duality Namespace


Matrix4.Mult Method (Matrix4, Single, Matrix4)

Matrix4Mult Method (Matrix4, Single, Matrix4)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Mult(
    ref Matrix4 left,
    float right,
    out Matrix4 result
)

Parameters

left
Type: DualityMatrix4
The left operand of the multiplication.
right
Type: SystemSingle
The right operand of the multiplication.
result
Type: DualityMatrix4
A new instance that is the result of the multiplication
See Also

Reference

Matrix4 Structure
Mult Overload
Duality Namespace


Matrix4.Normalize Method

Matrix4Normalize Method
Divides each element in the Matrix by the Determinant.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Normalized Method

Matrix4Normalized Method
Returns a normalised copy of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Matrix4 Normalized()

Return Value

Type: Matrix4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Perspective Method

Matrix4Perspective Method

Note: This API is now obsolete.

Build a projection matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreatePerspectiveFieldOfView instead.")]
public static Matrix4 Perspective(
    float fovy,
    float aspect,
    float near,
    float far
)

Parameters

fovy
Type: SystemSingle
Angle of the field of view in the y direction (in radians)
aspect
Type: SystemSingle
Aspect ratio of the view (width / height)
near
Type: SystemSingle
Distance to the near clip plane
far
Type: SystemSingle
Distance to the far clip plane

Return Value

Type: Matrix4
A projection matrix that transforms camera space to raster space
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Rotate Method

Matrix4Rotate Method
Overload List
Name | Description
Rotate(Quaternion) | Obsolete. Build a rotation matrix from a quaternion
Rotate(Vector3, Single) | Obsolete. Build a rotation matrix to rotate about the given axis
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Rotate Method (Quaternion)

Matrix4Rotate Method (Quaternion)

Note: This API is now obsolete.

Build a rotation matrix from a quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateRotation instead.")]
public static Matrix4 Rotate(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
the quaternion

Return Value

Type: Matrix4
A rotation matrix
See Also

Reference

Matrix4 Structure
Rotate Overload
Duality Namespace


Matrix4.Rotate Method (Vector3, Single)

Matrix4Rotate Method (Vector3, Single)

Note: This API is now obsolete.

Build a rotation matrix to rotate about the given axis

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateFromAxisAngle instead.")]
public static Matrix4 Rotate(
    Vector3 axis,
    float angle
)

Parameters

axis
Type: DualityVector3
the axis to rotate about
angle
Type: SystemSingle
angle in radians to rotate counter-clockwise (looking in the direction of the given axis)

Return Value

Type: Matrix4
A rotation matrix
See Also

Reference

Matrix4 Structure
Rotate Overload
Duality Namespace


Matrix4.RotateX Method

Matrix4RotateX Method

Note: This API is now obsolete.

Build a rotation matrix that rotates about the x-axis

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateRotationX instead.")]
public static Matrix4 RotateX(
    float angle
)

Parameters

angle
Type: SystemSingle
angle in radians to rotate counter-clockwise around the x-axis

Return Value

Type: Matrix4
A rotation matrix
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.RotateY Method

Matrix4RotateY Method

Note: This API is now obsolete.

Build a rotation matrix that rotates about the y-axis

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateRotationY instead.")]
public static Matrix4 RotateY(
    float angle
)

Parameters

angle
Type: SystemSingle
angle in radians to rotate counter-clockwise around the y-axis

Return Value

Type: Matrix4
A rotation matrix
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.RotateZ Method

Matrix4RotateZ Method

Note: This API is now obsolete.

Build a rotation matrix that rotates about the z-axis

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateRotationZ instead.")]
public static Matrix4 RotateZ(
    float angle
)

Parameters

angle
Type: SystemSingle
angle in radians to rotate counter-clockwise around the z-axis

Return Value

Type: Matrix4
A rotation matrix
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Scale Method

Matrix4Scale Method
Overload List
Name | Description
Scale(Single) | Obsolete. Build a scaling matrix
Scale(Vector3) | Obsolete. Build a scaling matrix
Scale(Single, Single, Single) | Obsolete. Build a scaling matrix
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Scale Method (Single)

Matrix4Scale Method (Single)

Note: This API is now obsolete.

Build a scaling matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateScale instead.")]
public static Matrix4 Scale(
    float scale
)

Parameters

scale
Type: SystemSingle
Single scale factor for x,y and z axes

Return Value

Type: Matrix4
A scaling matrix
See Also

Reference

Matrix4 Structure
Scale Overload
Duality Namespace


Matrix4.Scale Method (Vector3)

Matrix4Scale Method (Vector3)

Note: This API is now obsolete.

Build a scaling matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateScale instead.")]
public static Matrix4 Scale(
    Vector3 scale
)

Parameters

scale
Type: DualityVector3
Scale factors for x,y and z axes

Return Value

Type: Matrix4
A scaling matrix
See Also

Reference

Matrix4 Structure
Scale Overload
Duality Namespace


Matrix4.Scale Method (Single, Single, Single)

Matrix4Scale Method (Single, Single, Single)

Note: This API is now obsolete.

Build a scaling matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateScale instead.")]
public static Matrix4 Scale(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
Scale factor for x-axis
y
Type: SystemSingle
Scale factor for y-axis
z
Type: SystemSingle
Scale factor for z-axis

Return Value

Type: Matrix4
A scaling matrix
See Also

Reference

Matrix4 Structure
Scale Overload
Duality Namespace


Matrix4.Subtract Method

Matrix4Subtract Method
Overload List
Name | Description
Subtract(Matrix4, Matrix4) | Subtracts one instance from another.
Subtract(Matrix4, Matrix4, Matrix4) | Subtracts one instance from another.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Subtract Method (Matrix4, Matrix4)

Matrix4Subtract Method (Matrix4, Matrix4)
Subtracts one instance from another.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Subtract(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
The left operand of the subraction.
right
Type: DualityMatrix4
The right operand of the subraction.

Return Value

Type: Matrix4
A new instance that is the result of the subraction.
See Also

Reference

Matrix4 Structure
Subtract Overload
Duality Namespace


Matrix4.Subtract Method (Matrix4, Matrix4, Matrix4)

Matrix4Subtract Method (Matrix4, Matrix4, Matrix4)
Subtracts one instance from another.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Subtract(
    ref Matrix4 left,
    ref Matrix4 right,
    out Matrix4 result
)

Parameters

left
Type: DualityMatrix4
The left operand of the subraction.
right
Type: DualityMatrix4
The right operand of the subraction.
result
Type: DualityMatrix4
A new instance that is the result of the subraction.
See Also

Reference

Matrix4 Structure
Subtract Overload
Duality Namespace


Matrix4.ToString Method

Matrix4ToString Method
Returns a System.String that represents the current Matrix4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
The string representation of the matrix.
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Translation Method

Matrix4Translation Method
Overload List
Name | Description
Translation(Vector3) | Obsolete. Builds a translation matrix.
Translation(Single, Single, Single) | Obsolete. Build a translation matrix with the given translation
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Translation Method (Vector3)

Matrix4Translation Method (Vector3)

Note: This API is now obsolete.

Builds a translation matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateTranslation instead.")]
public static Matrix4 Translation(
    Vector3 trans
)

Parameters

trans
Type: DualityVector3
The translation vector.

Return Value

Type: Matrix4
A new Matrix4 instance.
See Also

Reference

Matrix4 Structure
Translation Overload
Duality Namespace


Matrix4.Translation Method (Single, Single, Single)

Matrix4Translation Method (Single, Single, Single)

Note: This API is now obsolete.

Build a translation matrix with the given translation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use CreateTranslation instead.")]
public static Matrix4 Translation(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
X translation
y
Type: SystemSingle
Y translation
z
Type: SystemSingle
Z translation

Return Value

Type: Matrix4
A Translation matrix
See Also

Reference

Matrix4 Structure
Translation Overload
Duality Namespace


Matrix4.Transpose Method

Matrix4Transpose Method
Overload List
 | Name | Description
Public method | Transpose | Converts this instance into its transpose.
 | Transpose(Matrix4) | Calculate the transpose of the given matrix
 | Transpose(Matrix4, Matrix4) | Calculate the transpose of the given matrix
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Transpose Method

Matrix4Transpose Method
Converts this instance into its transpose.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Transpose()
See Also

Reference

Matrix4 Structure
Transpose Overload
Duality Namespace


Matrix4.Transpose Method (Matrix4)

Matrix4Transpose Method (Matrix4)
Calculate the transpose of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 Transpose(
    Matrix4 mat
)

Parameters

mat
Type: DualityMatrix4
The matrix to transpose

Return Value

Type: Matrix4
The transpose of the given matrix
See Also

Reference

Matrix4 Structure
Transpose Overload
Duality Namespace


Matrix4.Transpose Method (Matrix4, Matrix4)

Matrix4Transpose Method (Matrix4, Matrix4)
Calculate the transpose of the given matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transpose(
    ref Matrix4 mat,
    out Matrix4 result
)

Parameters

mat
Type: DualityMatrix4
The matrix to transpose
result
Type: DualityMatrix4
The result of the calculation
See Also

Reference

Matrix4 Structure
Transpose Overload
Duality Namespace


Matrix4 Operators

Matrix4 Operators

The Matrix4 type exposes the following members.

Operators
Name | Description
Addition | Matrix addition
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Matrix4, Matrix4) | Matrix multiplication
Multiply(Matrix4, Single) | Matrix-scalar multiplication
Subtraction | Matrix subtraction
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Addition Operator

Matrix4Addition Operator
Matrix addition

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 operator +(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
left-hand operand
right
Type: DualityMatrix4
right-hand operand

Return Value

Type: Matrix4
A new Matrix4 which holds the result of the addition
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Equality Operator

Matrix4Equality Operator
Compares two instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
The first instance.
right
Type: DualityMatrix4
The second instance.

Return Value

Type: Boolean
True, if left equals right; false otherwise.
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Inequality Operator

Matrix4Inequality Operator
Compares two instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
The first instance.
right
Type: DualityMatrix4
The second instance.

Return Value

Type: Boolean
True, if left does not equal right; false otherwise.
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Multiply Operator

Matrix4Multiply Operator
Overload List
Name | Description
Multiply(Matrix4, Matrix4) | Matrix multiplication
Multiply(Matrix4, Single) | Matrix-scalar multiplication
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Multiply Operator (Matrix4, Matrix4)

Matrix4Multiply Operator (Matrix4, Matrix4)
Matrix multiplication

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 operator *(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
left-hand operand
right
Type: DualityMatrix4
right-hand operand

Return Value

Type: Matrix4
A new Matrix4 which holds the result of the multiplication
See Also

Reference

Matrix4 Structure
Multiply Overload
Duality Namespace


Matrix4.Multiply Operator (Matrix4, Single)

Matrix4Multiply Operator (Matrix4, Single)
Matrix-scalar multiplication

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 operator *(
    Matrix4 left,
    float right
)

Parameters

left
Type: DualityMatrix4
left-hand operand
right
Type: SystemSingle
right-hand operand

Return Value

Type: Matrix4
A new Matrix4 which holds the result of the multiplication
See Also

Reference

Matrix4 Structure
Multiply Overload
Duality Namespace


Matrix4.Subtraction Operator

Matrix4Subtraction Operator
Matrix subtraction

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Matrix4 operator -(
    Matrix4 left,
    Matrix4 right
)

Parameters

left
Type: DualityMatrix4
left-hand operand
right
Type: DualityMatrix4
right-hand operand

Return Value

Type: Matrix4
A new Matrix4 which holds the result of the subtraction
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4 Properties

Matrix4 Properties

The Matrix4 type exposes the following members.

Properties
 | Name | Description
Public property | Column0 | Gets the first column of this matrix.
Public property | Column1 | Gets the second column of this matrix.
Public property | Column2 | Gets the third column of this matrix.
Public property | Column3 | Gets the fourth column of this matrix.
Public property | Determinant | Gets the determinant of this matrix.
Public property | Diagonal | Gets or sets the values along the main diagonal of the matrix.
Public property | Item | Gets or sets the value at a specified row and column.
Public property | M11 | Gets or sets the value at row 1, column 1 of this instance.
Public property | M12 | Gets or sets the value at row 1, column 2 of this instance.
Public property | M13 | Gets or sets the value at row 1, column 3 of this instance.
Public property | M14 | Gets or sets the value at row 1, column 4 of this instance.
Public property | M21 | Gets or sets the value at row 2, column 1 of this instance.
Public property | M22 | Gets or sets the value at row 2, column 2 of this instance.
Public property | M23 | Gets or sets the value at row 2, column 3 of this instance.
Public property | M24 | Gets or sets the value at row 2, column 4 of this instance.
Public property | M31 | Gets or sets the value at row 3, column 1 of this instance.
Public property | M32 | Gets or sets the value at row 3, column 2 of this instance.
Public property | M33 | Gets or sets the value at row 3, column 3 of this instance.
Public property | M34 | Gets or sets the value at row 3, column 4 of this instance.
Public property | M41 | Gets or sets the value at row 4, column 1 of this instance.
Public property | M42 | Gets or sets the value at row 4, column 2 of this instance.
Public property | M43 | Gets or sets the value at row 4, column 3 of this instance.
Public property | M44 | Gets or sets the value at row 4, column 4 of this instance.
Public property | Trace | Gets the trace of the matrix, the sum of the values along the diagonal.
Top
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Column0 Property

Matrix4Column0 Property
Gets the first column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Column0 { get; set; }

Property Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Column1 Property

Matrix4Column1 Property
Gets the second column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Column1 { get; set; }

Property Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Column2 Property

Matrix4Column2 Property
Gets the third column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Column2 { get; set; }

Property Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Column3 Property

Matrix4Column3 Property
Gets the fourth column of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Column3 { get; set; }

Property Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Determinant Property

Matrix4Determinant Property
Gets the determinant of this matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Determinant { get; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Diagonal Property

Matrix4Diagonal Property
Gets or sets the values along the main diagonal of the matrix.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Diagonal { get; set; }

Property Value

Type: Vector4
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Item Property

Matrix4Item Property
Gets or sets the value at a specified row and column.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float this[
    int rowIndex,
    int columnIndex
] { get; set; }

Parameters

rowIndex
Type: SystemInt32
columnIndex
Type: SystemInt32

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M11 Property

Matrix4M11 Property
Gets or sets the value at row 1, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M11 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M12 Property

Matrix4M12 Property
Gets or sets the value at row 1, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M12 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M13 Property

Matrix4M13 Property
Gets or sets the value at row 1, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M13 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M14 Property

Matrix4M14 Property
Gets or sets the value at row 1, column 4 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M14 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M21 Property

Matrix4M21 Property
Gets or sets the value at row 2, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M21 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M22 Property

Matrix4M22 Property
Gets or sets the value at row 2, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M22 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M23 Property

Matrix4M23 Property
Gets or sets the value at row 2, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M23 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M24 Property

Matrix4M24 Property
Gets or sets the value at row 2, column 4 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M24 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M31 Property

Matrix4M31 Property
Gets or sets the value at row 3, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M31 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M32 Property

Matrix4M32 Property
Gets or sets the value at row 3, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M32 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M33 Property

Matrix4M33 Property
Gets or sets the value at row 3, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M33 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M34 Property

Matrix4M34 Property
Gets or sets the value at row 3, column 4 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M34 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M41 Property

Matrix4M41 Property
Gets or sets the value at row 4, column 1 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M41 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M42 Property

Matrix4M42 Property
Gets or sets the value at row 4, column 2 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M42 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M43 Property

Matrix4M43 Property
Gets or sets the value at row 4, column 3 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M43 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.M44 Property

Matrix4M44 Property
Gets or sets the value at row 4, column 4 of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float M44 { get; set; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


Matrix4.Trace Property

Matrix4Trace Property
Gets the trace of the matrix, the sum of the values along the diagonal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Trace { get; }

Property Value

Type: Single
See Also

Reference

Matrix4 Structure
Duality Namespace


ObjectCreator Class

ObjectCreator Class
Inheritance Hierarchy
SystemObject
DualityObjectCreator

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ObjectCreator

The ObjectCreator type exposes the following members.

Methods
Name | Description
CreateInstanceOf | Creates an instance of a Type. Attempts to use the Types default empty constructor, but will return an uninitialized object in case no constructor is available.
GetDefaultOf | Returns the default instance of a Type. Equals default(T), but works for Reflection.
Top
See Also

Reference

Duality Namespace


ObjectCreator Methods

ObjectCreator Methods

The ObjectCreator type exposes the following members.

Methods
Name | Description
CreateInstanceOf | Creates an instance of a Type. Attempts to use the Types default empty constructor, but will return an uninitialized object in case no constructor is available.
GetDefaultOf | Returns the default instance of a Type. Equals default(T), but works for Reflection.
Top
See Also

Reference

ObjectCreator Class
Duality Namespace


ObjectCreator.CreateInstanceOf Method

ObjectCreatorCreateInstanceOf Method
Creates an instance of a Type. Attempts to use the Types default empty constructor, but will return an uninitialized object in case no constructor is available.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Object CreateInstanceOf(
    this TypeInfo typeInfo
)

Parameters

typeInfo
Type: System.ReflectionTypeInfo
The Type to create an instance of.

Return Value

Type: Object
An instance of the Type. Null, if instanciation wasn't possible.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ObjectCreator Class
Duality Namespace


ObjectCreator.GetDefaultOf Method

ObjectCreatorGetDefaultOf Method
Returns the default instance of a Type. Equals default(T), but works for Reflection.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Object GetDefaultOf(
    this TypeInfo typeInfo
)

Parameters

typeInfo
Type: System.ReflectionTypeInfo

Return Value

Type: Object

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ObjectCreator Class
Duality Namespace


PhysicsUnit Class

PhysicsUnit Class
Inheritance Hierarchy
SystemObject
DualityPhysicsUnit

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class PhysicsUnit

The PhysicsUnit type exposes the following members.

Fields
Name | Description
AccelerationToDuality | SI unit: m/s²
AccelerationToPhysical |
AngleToDuality | SI unit: radians
AngleToPhysical |
AngularImpulseToDuality | SI unit: kg * m²/s
AngularImpulseToPhysical |
AngularVelocityToDuality | SI unit: radians/s
AngularVelocityToPhysical |
DensityToDuality | SI unit: kg / m²
DensityToPhysical |
ForceToDuality | SI unit: kg * m/s²
ForceToPhysical |
ImpulseToDuality | SI unit: kg * m/s
ImpulseToPhysical |
InertiaToDuality | SI unit: kg * m²
InertiaToPhysical |
LengthToDuality | SI unit: m
LengthToPhysical |
MassToDuality | SI unit: kg
MassToPhysical |
TimeToDuality | SI unit: s
TimeToPhysical |
TorqueToDuality | SI unit: kg * m²/s²
TorqueToPhysical |
VelocityToDuality | SI unit: m/s
VelocityToPhysical |
Top
See Also

Reference

Duality Namespace


PhysicsUnit Fields

PhysicsUnit Fields

The PhysicsUnit type exposes the following members.

Fields
Name | Description
AccelerationToDuality | SI unit: m/s²
AccelerationToPhysical |
AngleToDuality | SI unit: radians
AngleToPhysical |
AngularImpulseToDuality | SI unit: kg * m²/s
AngularImpulseToPhysical |
AngularVelocityToDuality | SI unit: radians/s
AngularVelocityToPhysical |
DensityToDuality | SI unit: kg / m²
DensityToPhysical |
ForceToDuality | SI unit: kg * m/s²
ForceToPhysical |
ImpulseToDuality | SI unit: kg * m/s
ImpulseToPhysical |
InertiaToDuality | SI unit: kg * m²
InertiaToPhysical |
LengthToDuality | SI unit: m
LengthToPhysical |
MassToDuality | SI unit: kg
MassToPhysical |
TimeToDuality | SI unit: s
TimeToPhysical |
TorqueToDuality | SI unit: kg * m²/s²
TorqueToPhysical |
VelocityToDuality | SI unit: m/s
VelocityToPhysical |
Top
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AccelerationToDuality Field

PhysicsUnitAccelerationToDuality Field
SI unit: m/s²

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AccelerationToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AccelerationToPhysical Field

PhysicsUnitAccelerationToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AccelerationToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngleToDuality Field

PhysicsUnitAngleToDuality Field
SI unit: radians

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngleToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngleToPhysical Field

PhysicsUnitAngleToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngleToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngularImpulseToDuality Field

PhysicsUnitAngularImpulseToDuality Field
SI unit: kg * m²/s

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngularImpulseToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngularImpulseToPhysical Field

PhysicsUnitAngularImpulseToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngularImpulseToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngularVelocityToDuality Field

PhysicsUnitAngularVelocityToDuality Field
SI unit: radians/s

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngularVelocityToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.AngularVelocityToPhysical Field

PhysicsUnitAngularVelocityToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float AngularVelocityToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.DensityToDuality Field

PhysicsUnitDensityToDuality Field
SI unit: kg / m²

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float DensityToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.DensityToPhysical Field

PhysicsUnitDensityToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float DensityToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.ForceToDuality Field

PhysicsUnitForceToDuality Field
SI unit: kg * m/s²

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float ForceToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.ForceToPhysical Field

PhysicsUnitForceToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float ForceToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.ImpulseToDuality Field

PhysicsUnitImpulseToDuality Field
SI unit: kg * m/s

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float ImpulseToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.ImpulseToPhysical Field

PhysicsUnitImpulseToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float ImpulseToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.InertiaToDuality Field

PhysicsUnitInertiaToDuality Field
SI unit: kg * m²

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float InertiaToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.InertiaToPhysical Field

PhysicsUnitInertiaToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float InertiaToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.LengthToDuality Field

PhysicsUnitLengthToDuality Field
SI unit: m

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float LengthToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.LengthToPhysical Field

PhysicsUnitLengthToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float LengthToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.MassToDuality Field

PhysicsUnitMassToDuality Field
SI unit: kg

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float MassToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.MassToPhysical Field

PhysicsUnitMassToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float MassToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.TimeToDuality Field

PhysicsUnitTimeToDuality Field
SI unit: s

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float TimeToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.TimeToPhysical Field

PhysicsUnitTimeToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float TimeToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.TorqueToDuality Field

PhysicsUnitTorqueToDuality Field
SI unit: kg * m²/s²

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float TorqueToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.TorqueToPhysical Field

PhysicsUnitTorqueToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float TorqueToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.VelocityToDuality Field

PhysicsUnitVelocityToDuality Field
SI unit: m/s

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float VelocityToDuality

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PhysicsUnit.VelocityToPhysical Field

PhysicsUnitVelocityToPhysical Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float VelocityToPhysical

Field Value

Type: Single
See Also

Reference

PhysicsUnit Class
Duality Namespace


PluginManager(T) Class

PluginManagerT Class
Inheritance Hierarchy
SystemObject
DualityPluginManagerT
DualityCorePluginManager

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class PluginManager<T>
where T : DualityPlugin

Type Parameters

T

The PluginManagerT type exposes the following members.

Methods
 | Name | Description
Public method | ClearPlugins | Disposes all loaded plugins and discards all related content / data.
Public method | DiscardPluginData | Requests the disposal of all content / data that is dependent on any of the currently active plugins. This functioanlity is invoked automatically as part of reloading or removing plugins.
Public method | GetAssemblies | Enumerates all currently loaded assemblies that are considered part of the managed subset of this PluginManagerT.
Public method | GetTypes | Enumerates all locally available Types that are assignable to the specified Type.
Public method | Init | Initializes the PluginManagerT with the specified IPluginLoader. This method needs to be called once after instantiation (or previous termination) before plugins can be loaded.
Public method | InitPlugin | Initializes the specified plugin. This concludes a manual plugin load or reload operation using API like LoadPlugin(Assembly, String) and ReloadPlugin(String).
Public method | InitPlugins | Initializes all previously loaded plugins.
Protected method | LoadPlugin(String) |
Public method | LoadPlugin(Assembly, String) | Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.
Public method | LoadPlugins | Loads all available plugins, as well as their potentially required auxilliary libraries.
Public method | LockPlugin | Locks the specified plugin assembly, so any reload attempts are blocked.
Protected method | OnInit |
Protected method | OnInitPlugin |
Protected method | OnTerminate |
Public method | ReloadPlugin | Reloads the specified plugin. Does not initialize it.
Protected method | RemovePlugin |
Public method | Terminate | Terminates the PluginManagerT. This will dispose all Duality plugins and plugin data.
Public method | UnlockPlugin | Unlocks the specified plugin assembly, so future attempts at reloading will no longer be blocked.
Top
Properties
 | Name | Description
Public property | DisposedPlugins | [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.
Public property | LoadedPlugins | [GET] Enumerates all currently loaded plugins.
Public property | PluginLoader | [GET] The plugin loader which is used by the PluginManagerT to discover and load available plugin assemblies.
Protected property | PluginLog | [GET / SET] An optional Log which is used for logging plugin loading states and issues.
Protected property | PluginRegistry | [GET] Maps assembly names to currently loaded plugins.
Top
Events
 | Name | Description
Public event | PluginsReady | Fired whenever a Duality plugin has been initialized. This is the case after loading or reloading one.
Public event | PluginsRemoved | Called right after removing a plugin. This allows other system to clear their internal caches and clean up everything that might have been left by the removed plugin. No plugin code is run after this event has been called.
Public event | PluginsRemoving | Called right before removing a plugin. This allows other systems to get rid of data and content that still depends on those plugins. Note that it is possible for some plugin termination / disposal code to be run after this event.
Top
See Also

Reference

Duality Namespace


PluginManager(T) Methods

PluginManagerT Methods

The PluginManagerT generic type exposes the following members.

Methods
 | Name | Description
Public method | ClearPlugins | Disposes all loaded plugins and discards all related content / data.
Public method | DiscardPluginData | Requests the disposal of all content / data that is dependent on any of the currently active plugins. This functioanlity is invoked automatically as part of reloading or removing plugins.
Public method | GetAssemblies | Enumerates all currently loaded assemblies that are considered part of the managed subset of this PluginManagerT.
Public method | GetTypes | Enumerates all locally available Types that are assignable to the specified Type.
Public method | Init | Initializes the PluginManagerT with the specified IPluginLoader. This method needs to be called once after instantiation (or previous termination) before plugins can be loaded.
Public method | InitPlugin | Initializes the specified plugin. This concludes a manual plugin load or reload operation using API like LoadPlugin(Assembly, String) and ReloadPlugin(String).
Public method | InitPlugins | Initializes all previously loaded plugins.
Protected method | LoadPlugin(String) |
Public method | LoadPlugin(Assembly, String) | Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.
Public method | LoadPlugins | Loads all available plugins, as well as their potentially required auxilliary libraries.
Public method | LockPlugin | Locks the specified plugin assembly, so any reload attempts are blocked.
Protected method | OnInit |
Protected method | OnInitPlugin |
Protected method | OnTerminate |
Public method | ReloadPlugin | Reloads the specified plugin. Does not initialize it.
Protected method | RemovePlugin |
Public method | Terminate | Terminates the PluginManagerT. This will dispose all Duality plugins and plugin data.
Public method | UnlockPlugin | Unlocks the specified plugin assembly, so future attempts at reloading will no longer be blocked.
Top
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).ClearPlugins Method

PluginManagerTClearPlugins Method
Disposes all loaded plugins and discards all related content / data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearPlugins()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).DiscardPluginData Method

PluginManagerTDiscardPluginData Method
Requests the disposal of all content / data that is dependent on any of the currently active plugins. This functioanlity is invoked automatically as part of reloading or removing plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DiscardPluginData()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).GetAssemblies Method

PluginManagerTGetAssemblies Method
Enumerates all currently loaded assemblies that are considered part of the managed subset of this PluginManagerT.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual IEnumerable<Assembly> GetAssemblies()

Return Value

Type: IEnumerable Assembly
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).GetTypes Method

PluginManagerTGetTypes Method
Enumerates all locally available Types that are assignable to the specified Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<TypeInfo> GetTypes(
    Type baseType
)

Parameters

baseType
Type: SystemType
The base type to use for matching the result types.

Return Value

Type: IEnumerable TypeInfo
An enumeration of all Duality types deriving from the specified type.
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).Init Method

PluginManagerTInit Method
Initializes the PluginManagerT with the specified IPluginLoader. This method needs to be called once after instantiation (or previous termination) before plugins can be loaded.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Init(
    IPluginLoader pluginLoader
)

Parameters

pluginLoader
Type: Duality.BackendIPluginLoader
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).InitPlugin Method

PluginManagerTInitPlugin Method
Initializes the specified plugin. This concludes a manual plugin load or reload operation using API like LoadPlugin(Assembly, String) and ReloadPlugin(String).

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InitPlugin(
    T plugin
)

Parameters

plugin
Type: T
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).InitPlugins Method

PluginManagerTInitPlugins Method
Initializes all previously loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void InitPlugins()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).LoadPlugin Method

PluginManagerTLoadPlugin Method
Overload List
 | Name | Description
Protected method | LoadPlugin(String) |
Public method | LoadPlugin(Assembly, String) | Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.
Top
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).LoadPlugin Method (String)

PluginManagerTLoadPlugin Method (String)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected T LoadPlugin(
    string pluginFilePath
)

Parameters

pluginFilePath
Type: SystemString

Return Value

Type: T
See Also

Reference

PluginManagerT Class
LoadPlugin Overload
Duality Namespace


PluginManager(T).LoadPlugin Method (Assembly, String)

PluginManagerTLoadPlugin Method (Assembly, String)
Adds an already loaded plugin Assembly to the internal Duality T registry. You shouldn't need to call this method in general, since Duality manages its plugins automatically.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T LoadPlugin(
    Assembly pluginAssembly,
    string pluginFilePath
)

Parameters

pluginAssembly
Type: System.ReflectionAssembly
pluginFilePath
Type: SystemString

Return Value

Type: T
Remarks
This method can be useful in certain cases when it is necessary to treat an Assembly as a Duality plugin, even though it isn't located in the Plugins folder, or is not available as a file at all. A typical case for this is Unit Testing where the testing Assembly may specify additional Duality types such as Components, Resources, etc.
See Also

Reference

PluginManagerT Class
LoadPlugin Overload
Duality Namespace


PluginManager(T).LoadPlugins Method

PluginManagerTLoadPlugins Method
Loads all available plugins, as well as their potentially required auxilliary libraries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void LoadPlugins()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).LockPlugin Method

PluginManagerTLockPlugin Method
Locks the specified plugin assembly, so any reload attempts are blocked.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LockPlugin(
    Assembly pluginAssembly
)

Parameters

pluginAssembly
Type: System.ReflectionAssembly
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).OnInit Method

PluginManagerTOnInit Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnInit()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).OnInitPlugin Method

PluginManagerTOnInitPlugin Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract void OnInitPlugin(
    T plugin
)

Parameters

plugin
Type: T
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).OnTerminate Method

PluginManagerTOnTerminate Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnTerminate()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).ReloadPlugin Method

PluginManagerTReloadPlugin Method
Reloads the specified plugin. Does not initialize it.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T ReloadPlugin(
    string pluginFilePath
)

Parameters

pluginFilePath
Type: SystemString

Return Value

Type: T
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).RemovePlugin Method

PluginManagerTRemovePlugin Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void RemovePlugin(
    T plugin
)

Parameters

plugin
Type: T
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).Terminate Method

PluginManagerTTerminate Method
Terminates the PluginManagerT. This will dispose all Duality plugins and plugin data.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Terminate()
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).UnlockPlugin Method

PluginManagerTUnlockPlugin Method
Unlocks the specified plugin assembly, so future attempts at reloading will no longer be blocked.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UnlockPlugin(
    Assembly pluginAssembly
)

Parameters

pluginAssembly
Type: System.ReflectionAssembly
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T) Properties

PluginManagerT Properties

The PluginManagerT generic type exposes the following members.

Properties
 | Name | Description
Public property | DisposedPlugins | [GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.
Public property | LoadedPlugins | [GET] Enumerates all currently loaded plugins.
Public property | PluginLoader | [GET] The plugin loader which is used by the PluginManagerT to discover and load available plugin assemblies.
Protected property | PluginLog | [GET / SET] An optional Log which is used for logging plugin loading states and issues.
Protected property | PluginRegistry | [GET] Maps assembly names to currently loaded plugins.
Top
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).DisposedPlugins Property

PluginManagerTDisposedPlugins Property
[GET] Enumerates all plugin assemblies that have been loaded before, but have been discarded due to a runtime plugin reload operation. This is usually only the case when being executed from withing the editor or manually triggering a plugin reload. However, this is normally unnecessary.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Assembly> DisposedPlugins { get; }

Property Value

Type: IEnumerable Assembly
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).LoadedPlugins Property

PluginManagerTLoadedPlugins Property
[GET] Enumerates all currently loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> LoadedPlugins { get; }

Property Value

Type: IEnumerable T
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginLoader Property

PluginManagerTPluginLoader Property
[GET] The plugin loader which is used by the PluginManagerT to discover and load available plugin assemblies.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IPluginLoader PluginLoader { get; }

Property Value

Type: IPluginLoader
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginLog Property

PluginManagerTPluginLog Property
[GET / SET] An optional Log which is used for logging plugin loading states and issues.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Log PluginLog { get; set; }

Property Value

Type: Log
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginRegistry Property

PluginManagerTPluginRegistry Property
[GET] Maps assembly names to currently loaded plugins.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected IReadOnlyDictionary PluginRegistry { get; }

Property Value

Type: IReadOnlyDictionaryTKey, TValue
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T) Events

PluginManagerT Events

The PluginManagerT generic type exposes the following members.

Events
 | Name | Description
Public event | PluginsReady | Fired whenever a Duality plugin has been initialized. This is the case after loading or reloading one.
Public event | PluginsRemoved | Called right after removing a plugin. This allows other system to clear their internal caches and clean up everything that might have been left by the removed plugin. No plugin code is run after this event has been called.
Public event | PluginsRemoving | Called right before removing a plugin. This allows other systems to get rid of data and content that still depends on those plugins. Note that it is possible for some plugin termination / disposal code to be run after this event.
Top
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginsReady Event

PluginManagerTPluginsReady Event
Fired whenever a Duality plugin has been initialized. This is the case after loading or reloading one.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<DualityPluginEventArgs> PluginsReady

Value

Type: SystemEventHandler DualityPluginEventArgs
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginsRemoved Event

PluginManagerTPluginsRemoved Event
Called right after removing a plugin. This allows other system to clear their internal caches and clean up everything that might have been left by the removed plugin. No plugin code is run after this event has been called.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<DualityPluginEventArgs> PluginsRemoved

Value

Type: SystemEventHandler DualityPluginEventArgs
See Also

Reference

PluginManagerT Class
Duality Namespace


PluginManager(T).PluginsRemoving Event

PluginManagerTPluginsRemoving Event
Called right before removing a plugin. This allows other systems to get rid of data and content that still depends on those plugins. Note that it is possible for some plugin termination / disposal code to be run after this event.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<DualityPluginEventArgs> PluginsRemoving

Value

Type: SystemEventHandler DualityPluginEventArgs
See Also

Reference

PluginManagerT Class
Duality Namespace


Point2 Structure

Point2 Structure
Represents a 2D point using two integer values. For vector math, see Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Point2 : IEquatable<Point2>

The Point2 type exposes the following members.

Constructors
 | Name | Description
Public method | Point2 | Constructs a new Point.
Top
Methods
 | Name | Description
 | Distance | Calculates the distance between two points described by two points.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Point2) | Indicates whether the current point is equal to another point.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Max | Calculate the component-wise maximum of two points.
 | Min | Calculate the component-wise minimum of two points.
Public method | ToString | Returns a System.String that represents the current Point. (Overrides ValueTypeToString.)
Top
Operators
Name | Description
Equality | Compares the specified instances for equality.
(Vector2 to Point2) |
(Point2 to Vector2) |
Inequality | Compares the specified instances for inequality.
Top
Fields
 | Name | Description
Public field | X | The X component of the Point.
Public field | Y | The Y component of the Point.
 | Zero | A point at the origin (0, 0).
Top
Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Point.
Top
See Also

Reference

Duality Namespace


Point2 Constructor

Point2 Constructor
Constructs a new Point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Point2(
    int x,
    int y
)

Parameters

x
Type: SystemInt32
The x coordinate of the Point.
y
Type: SystemInt32
The y coordinate of the Point.
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Fields

Point2 Fields

The Point2 type exposes the following members.

Fields
 | Name | Description
Public field | X | The X component of the Point.
Public field | Y | The Y component of the Point.
 | Zero | A point at the origin (0, 0).
Top
See Also

Reference

Point2 Structure
Duality Namespace


Point2.X Field

Point2X Field
The X component of the Point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int X

Field Value

Type: Int32
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Y Field

Point2Y Field
The Y component of the Point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int Y

Field Value

Type: Int32
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Zero Field

Point2Zero Field
A point at the origin (0, 0).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Point2 Zero

Field Value

Type: Point2
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Methods

Point2 Methods

The Point2 type exposes the following members.

Methods
 | Name | Description
 | Distance | Calculates the distance between two points described by two points.
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Point2) | Indicates whether the current point is equal to another point.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Max | Calculate the component-wise maximum of two points.
 | Min | Calculate the component-wise minimum of two points.
Public method | ToString | Returns a System.String that represents the current Point. (Overrides ValueTypeToString.)
Top
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Distance Method

Point2Distance Method
Calculates the distance between two points described by two points.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Distance(
    Point2 left,
    Point2 right
)

Parameters

left
Type: DualityPoint2
right
Type: DualityPoint2

Return Value

Type: Single
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Equals Method

Point2Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Point2) | Indicates whether the current point is equal to another point.
Top
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Equals Method (Object)

Point2Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare to.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Point2 Structure
Equals Overload
Duality Namespace


Point2.Equals Method (Point2)

Point2Equals Method (Point2)
Indicates whether the current point is equal to another point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Point2 other
)

Parameters

other
Type: DualityPoint2
A point to compare with this point.

Return Value

Type: Boolean
true if the current point is equal to the point parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Point2 Structure
Equals Overload
Duality Namespace


Point2.GetHashCode Method

Point2GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Max Method

Point2Max Method
Calculate the component-wise maximum of two points.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Point2 Max(
    Point2 a,
    Point2 b
)

Parameters

a
Type: DualityPoint2
First operand
b
Type: DualityPoint2
Second operand

Return Value

Type: Point2
The component-wise maximum
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Min Method

Point2Min Method
Calculate the component-wise minimum of two points.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Point2 Min(
    Point2 a,
    Point2 b
)

Parameters

a
Type: DualityPoint2
First operand
b
Type: DualityPoint2
Second operand

Return Value

Type: Point2
The component-wise minimum
See Also

Reference

Point2 Structure
Duality Namespace


Point2.ToString Method

Point2ToString Method
Returns a System.String that represents the current Point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Operators and Type Conversions

Point2 Operators and Type Conversions

The Point2 type exposes the following members.

Operators
Name | Description
Equality | Compares the specified instances for equality.
(Vector2 to Point2) |
(Point2 to Vector2) |
Inequality | Compares the specified instances for inequality.
Top
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Equality Operator

Point2Equality Operator
Compares the specified instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Point2 left,
    Point2 right
)

Parameters

left
Type: DualityPoint2
Left operand.
right
Type: DualityPoint2
Right operand.

Return Value

Type: Boolean
True if both instances are equal; false otherwise.
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Explicit Conversion (Vector2 to Point2)

Point2 Conversion (Vector2 to Point2)

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator Point2 (
    Vector2 r
)

Parameters

r
Type: DualityVector2

Return Value

Type: Point2
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Implicit Conversion (Point2 to Vector2)

Point2 Conversion (Point2 to Vector2)

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static implicit operator Vector2 (
    Point2 r
)

Parameters

r
Type: DualityPoint2

Return Value

Type: Vector2
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Inequality Operator

Point2Inequality Operator
Compares the specified instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Point2 left,
    Point2 right
)

Parameters

left
Type: DualityPoint2
Left operand.
right
Type: DualityPoint2
Right operand.

Return Value

Type: Boolean
True if both instances are not equal; false otherwise.
See Also

Reference

Point2 Structure
Duality Namespace


Point2 Properties

Point2 Properties

The Point2 type exposes the following members.

Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Point.
Top
See Also

Reference

Point2 Structure
Duality Namespace


Point2.Item Property

Point2Item Property
Gets or sets the value at the index of the Point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int this[
    int index
] { get; set; }

Parameters

index
Type: SystemInt32

Property Value

Type: Int32
See Also

Reference

Point2 Structure
Duality Namespace


Profile Class

Profile Class
This class houses several performance counters and performance measurement utility
Inheritance Hierarchy
SystemObject
DualityProfile

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class Profile

The Profile type exposes the following members.

Methods
Name | Description
AddToStat | Accumulates a statistical information value to a new or existing ProfileCounter with the specified name.
BeginMeasure | Begins time measurement using a new or existing ProfileCounter with the specified name.
EndMeasure | Ends time measurement using an existing ProfileCounter with the specified name.
GetCounterT | Returns an existing ProfileCounter with the specified name.
GetMeasure | Queries this frames time measurement value from an existing ProfileCounter with the specified name.
GetStat | Queries a statistical information value from an existing ProfileCounter with the specified name.
GetTextReport | Creates a text report of the current profiling data and returns it as string.
GetUsedCounters | Enumerates all ProfileCounter objects that have been actively used this frame.
RequestCounterT | Returns an existing ProfileCounter with the specified name, or creates one if none is found.
SaveTextReport(Stream) | Saves a text report of the current profiling data to the specified stream.
SaveTextReport(String) | Saves a text report of the current profiling data to the specified file.
Top
Fields
Name | Description
StatMemoryGarbageCollect0 |
StatMemoryGarbageCollect1 |
StatMemoryGarbageCollect2 |
StatMemoryTotalUsage |
StatNumDrawcalls |
StatNumMergedBatches |
StatNumOptimizedBatches |
StatNumPlaying2D |
StatNumPlaying3D |
StatNumRawBatches |
TimeCollectDrawcalls |
TimeFrame |
TimeLog |
TimeOptimizeDrawcalls |
TimePostProcessing |
TimeProcessDrawcalls |
TimeQueryVisibleRenderers |
TimeRender |
TimeSwapBuffers |
TimeUpdate |
TimeUpdateAudio |
TimeUpdatePhysics |
TimeUpdatePhysicsAddRemove |
TimeUpdatePhysicsContacts |
TimeUpdatePhysicsContinous |
TimeUpdatePhysicsController |
TimeUpdatePhysicsSolve |
TimeUpdateScene |
TimeUpdateSceneComponents |
TimeVisualPicking |
Top
See Also

Reference

Duality Namespace


Profile Fields

Profile Fields

The Profile type exposes the following members.

Fields
Name | Description
StatMemoryGarbageCollect0 |
StatMemoryGarbageCollect1 |
StatMemoryGarbageCollect2 |
StatMemoryTotalUsage |
StatNumDrawcalls |
StatNumMergedBatches |
StatNumOptimizedBatches |
StatNumPlaying2D |
StatNumPlaying3D |
StatNumRawBatches |
TimeCollectDrawcalls |
TimeFrame |
TimeLog |
TimeOptimizeDrawcalls |
TimePostProcessing |
TimeProcessDrawcalls |
TimeQueryVisibleRenderers |
TimeRender |
TimeSwapBuffers |
TimeUpdate |
TimeUpdateAudio |
TimeUpdatePhysics |
TimeUpdatePhysicsAddRemove |
TimeUpdatePhysicsContacts |
TimeUpdatePhysicsContinous |
TimeUpdatePhysicsController |
TimeUpdatePhysicsSolve |
TimeUpdateScene |
TimeUpdateSceneComponents |
TimeVisualPicking |
Top
See Also

Reference

Profile Class
Duality Namespace


Profile.StatMemoryGarbageCollect0 Field

ProfileStatMemoryGarbageCollect0 Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatMemoryGarbageCollect0

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatMemoryGarbageCollect1 Field

ProfileStatMemoryGarbageCollect1 Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatMemoryGarbageCollect1

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatMemoryGarbageCollect2 Field

ProfileStatMemoryGarbageCollect2 Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatMemoryGarbageCollect2

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatMemoryTotalUsage Field

ProfileStatMemoryTotalUsage Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatMemoryTotalUsage

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumDrawcalls Field

ProfileStatNumDrawcalls Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumDrawcalls

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumMergedBatches Field

ProfileStatNumMergedBatches Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumMergedBatches

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumOptimizedBatches Field

ProfileStatNumOptimizedBatches Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumOptimizedBatches

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumPlaying2D Field

ProfileStatNumPlaying2D Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumPlaying2D

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumPlaying3D Field

ProfileStatNumPlaying3D Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumPlaying3D

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.StatNumRawBatches Field

ProfileStatNumRawBatches Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly StatCounter StatNumRawBatches

Field Value

Type: StatCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeCollectDrawcalls Field

ProfileTimeCollectDrawcalls Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeCollectDrawcalls

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeFrame Field

ProfileTimeFrame Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeFrame

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeLog Field

ProfileTimeLog Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeLog

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeOptimizeDrawcalls Field

ProfileTimeOptimizeDrawcalls Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeOptimizeDrawcalls

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimePostProcessing Field

ProfileTimePostProcessing Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimePostProcessing

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeProcessDrawcalls Field

ProfileTimeProcessDrawcalls Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeProcessDrawcalls

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeQueryVisibleRenderers Field

ProfileTimeQueryVisibleRenderers Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeQueryVisibleRenderers

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeRender Field

ProfileTimeRender Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeRender

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeSwapBuffers Field

ProfileTimeSwapBuffers Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeSwapBuffers

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdate Field

ProfileTimeUpdate Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdate

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdateAudio Field

ProfileTimeUpdateAudio Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdateAudio

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysics Field

ProfileTimeUpdatePhysics Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysics

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysicsAddRemove Field

ProfileTimeUpdatePhysicsAddRemove Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysicsAddRemove

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysicsContacts Field

ProfileTimeUpdatePhysicsContacts Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysicsContacts

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysicsContinous Field

ProfileTimeUpdatePhysicsContinous Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysicsContinous

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysicsController Field

ProfileTimeUpdatePhysicsController Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysicsController

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdatePhysicsSolve Field

ProfileTimeUpdatePhysicsSolve Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdatePhysicsSolve

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdateScene Field

ProfileTimeUpdateScene Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdateScene

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeUpdateSceneComponents Field

ProfileTimeUpdateSceneComponents Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeUpdateSceneComponents

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.TimeVisualPicking Field

ProfileTimeVisualPicking Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly TimeCounter TimeVisualPicking

Field Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile Methods

Profile Methods

The Profile type exposes the following members.

Methods
Name | Description
AddToStat | Accumulates a statistical information value to a new or existing ProfileCounter with the specified name.
BeginMeasure | Begins time measurement using a new or existing ProfileCounter with the specified name.
EndMeasure | Ends time measurement using an existing ProfileCounter with the specified name.
GetCounterT | Returns an existing ProfileCounter with the specified name.
GetMeasure | Queries this frames time measurement value from an existing ProfileCounter with the specified name.
GetStat | Queries a statistical information value from an existing ProfileCounter with the specified name.
GetTextReport | Creates a text report of the current profiling data and returns it as string.
GetUsedCounters | Enumerates all ProfileCounter objects that have been actively used this frame.
RequestCounterT | Returns an existing ProfileCounter with the specified name, or creates one if none is found.
SaveTextReport(Stream) | Saves a text report of the current profiling data to the specified stream.
SaveTextReport(String) | Saves a text report of the current profiling data to the specified file.
Top
See Also

Reference

Profile Class
Duality Namespace


Profile.AddToStat Method

ProfileAddToStat Method
Accumulates a statistical information value to a new or existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void AddToStat(
    string counter,
    int value
)

Parameters

counter
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"
value
Type: SystemInt32
See Also

Reference

Profile Class
Duality Namespace


Profile.BeginMeasure Method

ProfileBeginMeasure Method
Begins time measurement using a new or existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static TimeCounter BeginMeasure(
    string counter
)

Parameters

counter
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"

Return Value

Type: TimeCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.EndMeasure Method

ProfileEndMeasure Method
Ends time measurement using an existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void EndMeasure(
    string counter
)

Parameters

counter
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"
See Also

Reference

Profile Class
Duality Namespace


Profile.GetCounter(T) Method

ProfileGetCounterT Method
Returns an existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T GetCounter<T>(
    string name
)
where T : ProfileCounter

Parameters

name
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"

Type Parameters

T

Return Value

Type: T
See Also

Reference

Profile Class
Duality Namespace


Profile.GetMeasure Method

ProfileGetMeasure Method
Queries this frames time measurement value from an existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float GetMeasure(
    string counter
)

Parameters

counter
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"

Return Value

Type: Single
See Also

Reference

Profile Class
Duality Namespace


Profile.GetStat Method

ProfileGetStat Method
Queries a statistical information value from an existing ProfileCounter with the specified name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetStat(
    string counter
)

Parameters

counter
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"

Return Value

Type: Int32
See Also

Reference

Profile Class
Duality Namespace


Profile.GetTextReport Method

ProfileGetTextReport Method
Creates a text report of the current profiling data and returns it as string.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetTextReport(
    IEnumerable<ProfileCounter> reportCounters,
    ProfileReportOptions options = ProfileReportOptions.LastValue
)

Parameters

reportCounters
Type: System.Collections.GenericIEnumerable ProfileCounter
options (Optional)
Type: DualityProfileReportOptions

Return Value

Type: String
See Also

Reference

Profile Class
Duality Namespace


Profile.GetUsedCounters Method

ProfileGetUsedCounters Method
Enumerates all ProfileCounter objects that have been actively used this frame.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<ProfileCounter> GetUsedCounters()

Return Value

Type: IEnumerable ProfileCounter
See Also

Reference

Profile Class
Duality Namespace


Profile.RequestCounter(T) Method

ProfileRequestCounterT Method
Returns an existing ProfileCounter with the specified name, or creates one if none is found.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T RequestCounter<T>(
    string name
)
where T : new(), ProfileCounter

Parameters

name
Type: SystemString
The ProfileCounter name to use for this measurement. For nested measurements, use path strings, e.g. "ParentCounter\ChildCounter"

Type Parameters

T

Return Value

Type: T
See Also

Reference

Profile Class
Duality Namespace


Profile.SaveTextReport Method

ProfileSaveTextReport Method
Overload List
Name | Description
SaveTextReport(Stream) | Saves a text report of the current profiling data to the specified stream.
SaveTextReport(String) | Saves a text report of the current profiling data to the specified file.
Top
See Also

Reference

Profile Class
Duality Namespace


Profile.SaveTextReport Method (Stream)

ProfileSaveTextReport Method (Stream)
Saves a text report of the current profiling data to the specified stream.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void SaveTextReport(
    Stream stream
)

Parameters

stream
Type: System.IOStream
See Also

Reference

Profile Class
SaveTextReport Overload
Duality Namespace


Profile.SaveTextReport Method (String)

ProfileSaveTextReport Method (String)
Saves a text report of the current profiling data to the specified file.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void SaveTextReport(
    string filePath
)

Parameters

filePath
Type: SystemString
See Also

Reference

Profile Class
SaveTextReport Overload
Duality Namespace


ProfileCounter Class

ProfileCounter Class
Inheritance Hierarchy
SystemObject
DualityProfileCounter
DualityStatCounter
DualityTimeCounter

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class ProfileCounter

The ProfileCounter type exposes the following members.

Constructors
 | Name | Description
Protected method | ProfileCounter | Initializes a new instance of the ProfileCounter class
Top
Methods
 | Name | Description
Public method | GetReportData | Gathers ProfileCounter data for generating a profile report.
Protected method | OnFrameTick |
Public method | Reset | Resets the counters frame-local measurement values.
Top
Fields
 | Name | Description
Protected field | lastUsed |
Protected field | sampleCount |
Protected field | used |
 | ValueHistoryLen |
Top
Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display.
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters.
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet.
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing.
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included.
Public property | Parent | [GET] This counters parent counter.
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry.
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame.
Top
See Also

Reference

Duality Namespace


ProfileCounter Constructor

ProfileCounter Constructor
Initializes a new instance of the ProfileCounter class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ProfileCounter()
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter Fields

ProfileCounter Fields

The ProfileCounter type exposes the following members.

Fields
 | Name | Description
Protected field | lastUsed |
Protected field | sampleCount |
Protected field | used |
 | ValueHistoryLen |
Top
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.lastUsed Field

ProfileCounterlastUsed Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected bool lastUsed

Field Value

Type: Boolean
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.sampleCount Field

ProfileCountersampleCount Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected int sampleCount

Field Value

Type: Int32
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.used Field

ProfileCounterused Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected bool used

Field Value

Type: Boolean
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.ValueHistoryLen Field

ProfileCounterValueHistoryLen Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int ValueHistoryLen

Field Value

Type: Int32
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter Methods

ProfileCounter Methods

The ProfileCounter type exposes the following members.

Methods
 | Name | Description
Public method | GetReportData | Gathers ProfileCounter data for generating a profile report.
Protected method | OnFrameTick |
Public method | Reset | Resets the counters frame-local measurement values.
Top
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.GetReportData Method

ProfileCounterGetReportData Method
Gathers ProfileCounter data for generating a profile report.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void GetReportData(
    out ProfileReportCounterData data,
    ProfileReportOptions options
)

Parameters

data
Type: DualityProfileReportCounterData
options
Type: DualityProfileReportOptions
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.OnFrameTick Method

ProfileCounterOnFrameTick Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnFrameTick()
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.Reset Method

ProfileCounterReset Method
Resets the counters frame-local measurement values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void Reset()
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter Properties

ProfileCounter Properties

The ProfileCounter type exposes the following members.

Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display.
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters.
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet.
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing.
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included.
Public property | Parent | [GET] This counters parent counter.
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry.
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame.
Top
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.DisplayName Property

ProfileCounterDisplayName Property
[GET] The name that this ProfileCounter uses for value display.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string DisplayName { get; }

Property Value

Type: String
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.FullName Property

ProfileCounterFullName Property
[GET / SET] The counters full name, including possibly existing parent counters.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FullName { get; set; }

Property Value

Type: String
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.HasData Property

ProfileCounterHasData Property
[GET] Returns whether this ProfileCounter has gathered and processed any usable data yet.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool HasData { get; }

Property Value

Type: Boolean
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.IsSingleValue Property

ProfileCounterIsSingleValue Property
[GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsSingleValue { get; set; }

Property Value

Type: Boolean
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.Name Property

ProfileCounterName Property
[GET / SET] The counters individual name, without any ancestor names included.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; set; }

Property Value

Type: String
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.Parent Property

ProfileCounterParent Property
[GET] This counters parent counter.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ProfileCounter Parent { get; }

Property Value

Type: ProfileCounter
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.ParentDepth Property

ProfileCounterParentDepth Property
[GET] Returns the depths of this counters ancestry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ParentDepth { get; }

Property Value

Type: Int32
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileCounter.WasUsed Property

ProfileCounterWasUsed Property
[GET] Returns whether this ProfileCounter was used last frame.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool WasUsed { get; }

Property Value

Type: Boolean
See Also

Reference

ProfileCounter Class
Duality Namespace


ProfileReportCounterData Structure

ProfileReportCounterData Structure

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct ProfileReportCounterData

The ProfileReportCounterData type exposes the following members.

Fields
 | Name | Description
Public field | AverageValue |
Public field | LastValue |
Public field | MaxValue |
Public field | MinValue |
Public field | SampleCount |
Public field | Severity |
Top
See Also

Reference

Duality Namespace


ProfileReportCounterData Fields

ProfileReportCounterData Fields

The ProfileReportCounterData type exposes the following members.

Fields
 | Name | Description
Public field | AverageValue |
Public field | LastValue |
Public field | MaxValue |
Public field | MinValue |
Public field | SampleCount |
Public field | Severity |
Top
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.AverageValue Field

ProfileReportCounterDataAverageValue Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string AverageValue

Field Value

Type: String
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.LastValue Field

ProfileReportCounterDataLastValue Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string LastValue

Field Value

Type: String
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.MaxValue Field

ProfileReportCounterDataMaxValue Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string MaxValue

Field Value

Type: String
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.MinValue Field

ProfileReportCounterDataMinValue Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string MinValue

Field Value

Type: String
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.SampleCount Field

ProfileReportCounterDataSampleCount Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string SampleCount

Field Value

Type: String
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportCounterData.Severity Field

ProfileReportCounterDataSeverity Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Severity

Field Value

Type: Single
See Also

Reference

ProfileReportCounterData Structure
Duality Namespace


ProfileReportOptions Enumeration

ProfileReportOptions Enumeration

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum ProfileReportOptions
Members
Member name | Value | Description
None | 0 |
LastValue | 1 |
AverageValue | 2 |
SampleCount | 4 |
MinValue | 8 |
MaxValue | 16 |
GroupHeader | 4096 |
Header | 8192 |
FormattedText | 16384 |
OmitMinorValues | 32768 |
See Also

Reference

Duality Namespace


Quaternion Structure

Quaternion Structure
Represents a Quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Quaternion : IEquatable<Quaternion>

The Quaternion type exposes the following members.

Constructors
 | Name | Description
Public method | Quaternion(Vector3, Single) | Construct a new Quaternion from vector and w components
Public method | Quaternion(Single, Single, Single, Single) | Construct a new Quaternion
Top
Methods
 | Name | Description
 | Add(Quaternion, Quaternion) | Add two quaternions
 | Add(Quaternion, Quaternion, Quaternion) | Add two quaternions
Public method | Conjugate | Inverts the Vector3 component of this Quaternion.
 | Conjugate(Quaternion) | Get the conjugate of the given quaternion
 | Conjugate(Quaternion, Quaternion) | Get the conjugate of the given quaternion
Public method | Equals(Object) | Compares this object instance to another object for equality. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Quaternion) | Compares this Quaternion instance to another Quaternion for equality.
 | FromAxisAngle | Build a quaternion from the given axis and angle
 | FromMatrix(Matrix3) | Builds a quaternion from the given rotation matrix
 | FromMatrix(Matrix3, Quaternion) | Builds a quaternion from the given rotation matrix
Public method | GetHashCode | Provides the hash code for this object. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Reverses the rotation angle of this Quaterniond.
 | Invert(Quaternion) | Get the inverse of the given quaternion
 | Invert(Quaternion, Quaternion) | Get the inverse of the given quaternion
Public method | Inverted | Returns a copy of this Quaterniond with its rotation angle reversed.
 | Mult(Quaternion, Quaternion) | Obsolete. Multiplies two instances.
 | Mult(Quaternion, Quaternion, Quaternion) | Obsolete. Multiplies two instances.
 | Multiply(Quaternion, Quaternion) | Multiplies two instances.
 | Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
 | Multiply(Quaternion, Quaternion, Quaternion) | Multiplies two instances.
 | Multiply(Quaternion, Single, Quaternion) | Multiplies an instance by a scalar.
Public method | Normalize | Scales the Quaternion to unit length.
 | Normalize(Quaternion) | Scale the given quaternion to unit length
 | Normalize(Quaternion, Quaternion) | Scale the given quaternion to unit length
Public method | Normalized | Returns a copy of the Quaternion scaled to unit length.
 | Slerp | Do Spherical linear interpolation between two quaternions
 | Sub(Quaternion, Quaternion) | Subtracts two instances.
 | Sub(Quaternion, Quaternion, Quaternion) | Subtracts two instances.
Public method | ToAxisAngle | Convert this instance to an axis-angle representation.
Public method | ToAxisAngle(Vector3, Single) | Convert the current quaternion to axis angle representation
Public method | ToString | Returns a System.String that represents the current Quaternion. (Overrides ValueTypeToString.)
Top
Operators
Name | Description
Addition | Adds two instances.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Quaternion) | Multiplies an instance by a scalar.
Multiply(Quaternion, Quaternion) | Multiplies two instances.
Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
Top
Fields
Name | Description
Identity | Defines the identity quaternion.
Top
Properties
 | Name | Description
Public property | Length | Gets the length (magnitude) of the quaternion.
Public property | LengthSquared | Gets the square of the quaternion length (magnitude).
Public property | W | Gets or sets the W component of this instance.
Public property | X | Gets or sets the X component of this instance.
Public property | Xyz | Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
Public property | Y | Gets or sets the Y component of this instance.
Public property | Z | Gets or sets the Z component of this instance.
Top
See Also

Reference

Duality Namespace


Quaternion Constructor

Quaternion Constructor
Overload List
 | Name | Description
Public method | Quaternion(Vector3, Single) | Construct a new Quaternion from vector and w components
Public method | Quaternion(Single, Single, Single, Single) | Construct a new Quaternion
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion Constructor (Vector3, Single)

Quaternion Constructor (Vector3, Single)
Construct a new Quaternion from vector and w components

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion(
    Vector3 v,
    float w
)

Parameters

v
Type: DualityVector3
The vector part
w
Type: SystemSingle
The w part
See Also

Reference

Quaternion Structure
Quaternion Overload
Duality Namespace


Quaternion Constructor (Single, Single, Single, Single)

Quaternion Constructor (Single, Single, Single, Single)
Construct a new Quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion(
    float x,
    float y,
    float z,
    float w
)

Parameters

x
Type: SystemSingle
The x component
y
Type: SystemSingle
The y component
z
Type: SystemSingle
The z component
w
Type: SystemSingle
The w component
See Also

Reference

Quaternion Structure
Quaternion Overload
Duality Namespace


Quaternion Fields

Quaternion Fields

The Quaternion type exposes the following members.

Fields
Name | Description
Identity | Defines the identity quaternion.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Identity Field

QuaternionIdentity Field
Defines the identity quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Quaternion Identity

Field Value

Type: Quaternion
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion Methods

Quaternion Methods

The Quaternion type exposes the following members.

Methods
 | Name | Description
 | Add(Quaternion, Quaternion) | Add two quaternions
 | Add(Quaternion, Quaternion, Quaternion) | Add two quaternions
Public method | Conjugate | Inverts the Vector3 component of this Quaternion.
 | Conjugate(Quaternion) | Get the conjugate of the given quaternion
 | Conjugate(Quaternion, Quaternion) | Get the conjugate of the given quaternion
Public method | Equals(Object) | Compares this object instance to another object for equality. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Quaternion) | Compares this Quaternion instance to another Quaternion for equality.
 | FromAxisAngle | Build a quaternion from the given axis and angle
 | FromMatrix(Matrix3) | Builds a quaternion from the given rotation matrix
 | FromMatrix(Matrix3, Quaternion) | Builds a quaternion from the given rotation matrix
Public method | GetHashCode | Provides the hash code for this object. (Overrides ValueTypeGetHashCode.)
Public method | Invert | Reverses the rotation angle of this Quaterniond.
 | Invert(Quaternion) | Get the inverse of the given quaternion
 | Invert(Quaternion, Quaternion) | Get the inverse of the given quaternion
Public method | Inverted | Returns a copy of this Quaterniond with its rotation angle reversed.
 | Mult(Quaternion, Quaternion) | Obsolete. Multiplies two instances.
 | Mult(Quaternion, Quaternion, Quaternion) | Obsolete. Multiplies two instances.
 | Multiply(Quaternion, Quaternion) | Multiplies two instances.
 | Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
 | Multiply(Quaternion, Quaternion, Quaternion) | Multiplies two instances.
 | Multiply(Quaternion, Single, Quaternion) | Multiplies an instance by a scalar.
Public method | Normalize | Scales the Quaternion to unit length.
 | Normalize(Quaternion) | Scale the given quaternion to unit length
 | Normalize(Quaternion, Quaternion) | Scale the given quaternion to unit length
Public method | Normalized | Returns a copy of the Quaternion scaled to unit length.
 | Slerp | Do Spherical linear interpolation between two quaternions
 | Sub(Quaternion, Quaternion) | Subtracts two instances.
 | Sub(Quaternion, Quaternion, Quaternion) | Subtracts two instances.
Public method | ToAxisAngle | Convert this instance to an axis-angle representation.
Public method | ToAxisAngle(Vector3, Single) | Convert the current quaternion to axis angle representation
Public method | ToString | Returns a System.String that represents the current Quaternion. (Overrides ValueTypeToString.)
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Add Method

QuaternionAdd Method
Overload List
Name | Description
Add(Quaternion, Quaternion) | Add two quaternions
Add(Quaternion, Quaternion, Quaternion) | Add two quaternions
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Add Method (Quaternion, Quaternion)

QuaternionAdd Method (Quaternion, Quaternion)
Add two quaternions

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Add(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first operand
right
Type: DualityQuaternion
The second operand

Return Value

Type: Quaternion
The result of the addition
See Also

Reference

Quaternion Structure
Add Overload
Duality Namespace


Quaternion.Add Method (Quaternion, Quaternion, Quaternion)

QuaternionAdd Method (Quaternion, Quaternion, Quaternion)
Add two quaternions

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref Quaternion left,
    ref Quaternion right,
    out Quaternion result
)

Parameters

left
Type: DualityQuaternion
The first operand
right
Type: DualityQuaternion
The second operand
result
Type: DualityQuaternion
The result of the addition
See Also

Reference

Quaternion Structure
Add Overload
Duality Namespace


Quaternion.Conjugate Method

QuaternionConjugate Method
Overload List
 | Name | Description
Public method | Conjugate | Inverts the Vector3 component of this Quaternion.
 | Conjugate(Quaternion) | Get the conjugate of the given quaternion
 | Conjugate(Quaternion, Quaternion) | Get the conjugate of the given quaternion
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Conjugate Method

QuaternionConjugate Method
Inverts the Vector3 component of this Quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Conjugate()
See Also

Reference

Quaternion Structure
Conjugate Overload
Duality Namespace


Quaternion.Conjugate Method (Quaternion)

QuaternionConjugate Method (Quaternion)
Get the conjugate of the given quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Conjugate(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
The quaternion

Return Value

Type: Quaternion
The conjugate of the given quaternion
See Also

Reference

Quaternion Structure
Conjugate Overload
Duality Namespace


Quaternion.Conjugate Method (Quaternion, Quaternion)

QuaternionConjugate Method (Quaternion, Quaternion)
Get the conjugate of the given quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Conjugate(
    ref Quaternion q,
    out Quaternion result
)

Parameters

q
Type: DualityQuaternion
The quaternion
result
Type: DualityQuaternion
The conjugate of the given quaternion
See Also

Reference

Quaternion Structure
Conjugate Overload
Duality Namespace


Quaternion.Equals Method

QuaternionEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Compares this object instance to another object for equality. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Quaternion) | Compares this Quaternion instance to another Quaternion for equality.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Equals Method (Object)

QuaternionEquals Method (Object)
Compares this object instance to another object for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object other
)

Parameters

other
Type: SystemObject
The other object to be used in the comparison.

Return Value

Type: Boolean
True if both objects are Quaternions of equal value. Otherwise it returns false.
See Also

Reference

Quaternion Structure
Equals Overload
Duality Namespace


Quaternion.Equals Method (Quaternion)

QuaternionEquals Method (Quaternion)
Compares this Quaternion instance to another Quaternion for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Quaternion other
)

Parameters

other
Type: DualityQuaternion
The other Quaternion to be used in the comparison.

Return Value

Type: Boolean
True if both instances are equal; false otherwise.

Implements

IEquatableTEquals(T)
See Also

Reference

Quaternion Structure
Equals Overload
Duality Namespace


Quaternion.FromAxisAngle Method

QuaternionFromAxisAngle Method
Build a quaternion from the given axis and angle

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion FromAxisAngle(
    Vector3 axis,
    float angle
)

Parameters

axis
Type: DualityVector3
The axis to rotate about
angle
Type: SystemSingle
The rotation angle in radians

Return Value

Type: Quaternion
The equivalent quaternion
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.FromMatrix Method

QuaternionFromMatrix Method
Overload List
Name | Description
FromMatrix(Matrix3) | Builds a quaternion from the given rotation matrix
FromMatrix(Matrix3, Quaternion) | Builds a quaternion from the given rotation matrix
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.FromMatrix Method (Matrix3)

QuaternionFromMatrix Method (Matrix3)
Builds a quaternion from the given rotation matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion FromMatrix(
    Matrix3 matrix
)

Parameters

matrix
Type: DualityMatrix3
A rotation matrix

Return Value

Type: Quaternion
The equivalent quaternion
See Also

Reference

Quaternion Structure
FromMatrix Overload
Duality Namespace


Quaternion.FromMatrix Method (Matrix3, Quaternion)

QuaternionFromMatrix Method (Matrix3, Quaternion)
Builds a quaternion from the given rotation matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void FromMatrix(
    ref Matrix3 matrix,
    out Quaternion result
)

Parameters

matrix
Type: DualityMatrix3
A rotation matrix
result
Type: DualityQuaternion
The equivalent quaternion
See Also

Reference

Quaternion Structure
FromMatrix Overload
Duality Namespace


Quaternion.GetHashCode Method

QuaternionGetHashCode Method
Provides the hash code for this object.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A hash code formed from the bitwise XOR of this objects members.
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Invert Method

QuaternionInvert Method
Overload List
 | Name | Description
Public method | Invert | Reverses the rotation angle of this Quaterniond.
 | Invert(Quaternion) | Get the inverse of the given quaternion
 | Invert(Quaternion, Quaternion) | Get the inverse of the given quaternion
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Invert Method

QuaternionInvert Method
Reverses the rotation angle of this Quaterniond.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Invert()
See Also

Reference

Quaternion Structure
Invert Overload
Duality Namespace


Quaternion.Invert Method (Quaternion)

QuaternionInvert Method (Quaternion)
Get the inverse of the given quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Invert(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
The quaternion to invert

Return Value

Type: Quaternion
The inverse of the given quaternion
See Also

Reference

Quaternion Structure
Invert Overload
Duality Namespace


Quaternion.Invert Method (Quaternion, Quaternion)

QuaternionInvert Method (Quaternion, Quaternion)
Get the inverse of the given quaternion

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Invert(
    ref Quaternion q,
    out Quaternion result
)

Parameters

q
Type: DualityQuaternion
The quaternion to invert
result
Type: DualityQuaternion
The inverse of the given quaternion
See Also

Reference

Quaternion Structure
Invert Overload
Duality Namespace


Quaternion.Inverted Method

QuaternionInverted Method
Returns a copy of this Quaterniond with its rotation angle reversed.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion Inverted()

Return Value

Type: Quaternion
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Mult Method

QuaternionMult Method
Overload List
Name | Description
Mult(Quaternion, Quaternion) | Obsolete. Multiplies two instances.
Mult(Quaternion, Quaternion, Quaternion) | Obsolete. Multiplies two instances.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Mult Method (Quaternion, Quaternion)

QuaternionMult Method (Quaternion, Quaternion)

Note: This API is now obsolete.

Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use Multiply instead.")]
public static Quaternion Mult(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Quaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Mult Overload
Duality Namespace


Quaternion.Mult Method (Quaternion, Quaternion, Quaternion)

QuaternionMult Method (Quaternion, Quaternion, Quaternion)

Note: This API is now obsolete.

Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
[ObsoleteAttribute("Use Multiply instead.")]
public static void Mult(
    ref Quaternion left,
    ref Quaternion right,
    out Quaternion result
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.
result
Type: DualityQuaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Mult Overload
Duality Namespace


Quaternion.Multiply Method

QuaternionMultiply Method
Overload List
Name | Description
Multiply(Quaternion, Quaternion) | Multiplies two instances.
Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
Multiply(Quaternion, Quaternion, Quaternion) | Multiplies two instances.
Multiply(Quaternion, Single, Quaternion) | Multiplies an instance by a scalar.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Multiply Method (Quaternion, Quaternion)

QuaternionMultiply Method (Quaternion, Quaternion)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Multiply(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Quaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Multiply Method (Quaternion, Single)

QuaternionMultiply Method (Quaternion, Single)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Multiply(
    Quaternion quaternion,
    float scale
)

Parameters

quaternion
Type: DualityQuaternion
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Quaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Multiply Method (Quaternion, Quaternion, Quaternion)

QuaternionMultiply Method (Quaternion, Quaternion, Quaternion)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Quaternion left,
    ref Quaternion right,
    out Quaternion result
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.
result
Type: DualityQuaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Multiply Method (Quaternion, Single, Quaternion)

QuaternionMultiply Method (Quaternion, Single, Quaternion)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Quaternion quaternion,
    float scale,
    out Quaternion result
)

Parameters

quaternion
Type: DualityQuaternion
The instance.
scale
Type: SystemSingle
The scalar.
result
Type: DualityQuaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Normalize Method

QuaternionNormalize Method
Overload List
 | Name | Description
Public method | Normalize | Scales the Quaternion to unit length.
 | Normalize(Quaternion) | Scale the given quaternion to unit length
 | Normalize(Quaternion, Quaternion) | Scale the given quaternion to unit length
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Normalize Method

QuaternionNormalize Method
Scales the Quaternion to unit length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Quaternion Structure
Normalize Overload
Duality Namespace


Quaternion.Normalize Method (Quaternion)

QuaternionNormalize Method (Quaternion)
Scale the given quaternion to unit length

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Normalize(
    Quaternion q
)

Parameters

q
Type: DualityQuaternion
The quaternion to normalize

Return Value

Type: Quaternion
The normalized quaternion
See Also

Reference

Quaternion Structure
Normalize Overload
Duality Namespace


Quaternion.Normalize Method (Quaternion, Quaternion)

QuaternionNormalize Method (Quaternion, Quaternion)
Scale the given quaternion to unit length

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Normalize(
    ref Quaternion q,
    out Quaternion result
)

Parameters

q
Type: DualityQuaternion
The quaternion to normalize
result
Type: DualityQuaternion
The normalized quaternion
See Also

Reference

Quaternion Structure
Normalize Overload
Duality Namespace


Quaternion.Normalized Method

QuaternionNormalized Method
Returns a copy of the Quaternion scaled to unit length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Quaternion Normalized()

Return Value

Type: Quaternion
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Slerp Method

QuaternionSlerp Method
Do Spherical linear interpolation between two quaternions

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Slerp(
    Quaternion q1,
    Quaternion q2,
    float blend
)

Parameters

q1
Type: DualityQuaternion
The first quaternion
q2
Type: DualityQuaternion
The second quaternion
blend
Type: SystemSingle
The blend factor

Return Value

Type: Quaternion
A smooth blend between the given quaternions
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Sub Method

QuaternionSub Method
Overload List
Name | Description
Sub(Quaternion, Quaternion) | Subtracts two instances.
Sub(Quaternion, Quaternion, Quaternion) | Subtracts two instances.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Sub Method (Quaternion, Quaternion)

QuaternionSub Method (Quaternion, Quaternion)
Subtracts two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion Sub(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The left instance.
right
Type: DualityQuaternion
The right instance.

Return Value

Type: Quaternion
The result of the operation.
See Also

Reference

Quaternion Structure
Sub Overload
Duality Namespace


Quaternion.Sub Method (Quaternion, Quaternion, Quaternion)

QuaternionSub Method (Quaternion, Quaternion, Quaternion)
Subtracts two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Sub(
    ref Quaternion left,
    ref Quaternion right,
    out Quaternion result
)

Parameters

left
Type: DualityQuaternion
The left instance.
right
Type: DualityQuaternion
The right instance.
result
Type: DualityQuaternion
The result of the operation.
See Also

Reference

Quaternion Structure
Sub Overload
Duality Namespace


Quaternion.ToAxisAngle Method

QuaternionToAxisAngle Method
Overload List
 | Name | Description
Public method | ToAxisAngle | Convert this instance to an axis-angle representation.
Public method | ToAxisAngle(Vector3, Single) | Convert the current quaternion to axis angle representation
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.ToAxisAngle Method

QuaternionToAxisAngle Method
Convert this instance to an axis-angle representation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 ToAxisAngle()

Return Value

Type: Vector4
A Vector4 that is the axis-angle representation of this quaternion.
See Also

Reference

Quaternion Structure
ToAxisAngle Overload
Duality Namespace


Quaternion.ToAxisAngle Method (Vector3, Single)

QuaternionToAxisAngle Method (Vector3, Single)
Convert the current quaternion to axis angle representation

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void ToAxisAngle(
    out Vector3 axis,
    out float angle
)

Parameters

axis
Type: DualityVector3
The resultant axis
angle
Type: SystemSingle
The resultant angle
See Also

Reference

Quaternion Structure
ToAxisAngle Overload
Duality Namespace


Quaternion.ToString Method

QuaternionToString Method
Returns a System.String that represents the current Quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion Operators

Quaternion Operators

The Quaternion type exposes the following members.

Operators
Name | Description
Addition | Adds two instances.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Quaternion) | Multiplies an instance by a scalar.
Multiply(Quaternion, Quaternion) | Multiplies two instances.
Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Addition Operator

QuaternionAddition Operator
Adds two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion operator +(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Quaternion
The result of the calculation.
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Equality Operator

QuaternionEquality Operator
Compares two instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Boolean
True, if left equals right; false otherwise.
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Inequality Operator

QuaternionInequality Operator
Compares two instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Boolean
True, if left does not equal right; false otherwise.
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Multiply Operator

QuaternionMultiply Operator
Overload List
Name | Description
Multiply(Single, Quaternion) | Multiplies an instance by a scalar.
Multiply(Quaternion, Quaternion) | Multiplies two instances.
Multiply(Quaternion, Single) | Multiplies an instance by a scalar.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Multiply Operator (Single, Quaternion)

QuaternionMultiply Operator (Single, Quaternion)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion operator *(
    float scale,
    Quaternion quaternion
)

Parameters

scale
Type: SystemSingle
The scalar.
quaternion
Type: DualityQuaternion
The instance.

Return Value

Type: Quaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Multiply Operator (Quaternion, Quaternion)

QuaternionMultiply Operator (Quaternion, Quaternion)
Multiplies two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion operator *(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Quaternion
The result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Multiply Operator (Quaternion, Single)

QuaternionMultiply Operator (Quaternion, Single)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion operator *(
    Quaternion quaternion,
    float scale
)

Parameters

quaternion
Type: DualityQuaternion
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Quaternion
A new instance containing the result of the calculation.
See Also

Reference

Quaternion Structure
Multiply Overload
Duality Namespace


Quaternion.Subtraction Operator

QuaternionSubtraction Operator
Subtracts two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Quaternion operator -(
    Quaternion left,
    Quaternion right
)

Parameters

left
Type: DualityQuaternion
The first instance.
right
Type: DualityQuaternion
The second instance.

Return Value

Type: Quaternion
The result of the calculation.
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion Properties

Quaternion Properties

The Quaternion type exposes the following members.

Properties
 | Name | Description
Public property | Length | Gets the length (magnitude) of the quaternion.
Public property | LengthSquared | Gets the square of the quaternion length (magnitude).
Public property | W | Gets or sets the W component of this instance.
Public property | X | Gets or sets the X component of this instance.
Public property | Xyz | Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
Public property | Y | Gets or sets the Y component of this instance.
Public property | Z | Gets or sets the Z component of this instance.
Top
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Length Property

QuaternionLength Property
Gets the length (magnitude) of the quaternion.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Length { get; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace
QuaternionLengthSquared


Quaternion.LengthSquared Property

QuaternionLengthSquared Property
Gets the square of the quaternion length (magnitude).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float LengthSquared { get; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.W Property

QuaternionW Property
Gets or sets the W component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float W { get; set; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.X Property

QuaternionX Property
Gets or sets the X component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float X { get; set; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Xyz Property

QuaternionXyz Property
Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Xyz { get; set; }

Property Value

Type: Vector3
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Y Property

QuaternionY Property
Gets or sets the Y component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Y { get; set; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace


Quaternion.Z Property

QuaternionZ Property
Gets or sets the Z component of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Z { get; set; }

Property Value

Type: Single
See Also

Reference

Quaternion Structure
Duality Namespace


Range Structure

Range Structure
Represents a range of values between a specific minimum and maximum value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct Range : IEquatable<Range>

The Range type exposes the following members.

Constructors
 | Name | Description
Public method | Range(Single) | Creates a new Range with zero-width from a single value.
Public method | Range(Single, Single) | Creates a new Range from mininmum and maximum values.
Top
Methods
 | Name | Description
Public method | Contains(Single) | Returns whether this Range contains a certain value.
Public method | Contains(Range) | Returns whether this Range contains a certain other range.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Range) |
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Lerp | Performs a linear interpolation between the Ranges minimum and maximum value using the specified blend factor.
Public method | Normalize | Normalizes this Range, i.e. flips minimum and maximum value, if irregular.
Public method | ToString | (Overrides ValueTypeToString.)
Top
Operators
Name | Description
Addition | Adds two Ranges by adding each of their components individually.
Division | Divides two Ranges by dividing each of their components individually.
Equality | Returns whether two Ranges are equal.
(Single to Range) | Performs an implicit conversion from a single value to a ranged value.
Inequality | Returns whether two Ranges are inequal.
Multiply | Multiplies two Ranges by multiplying each of their components individually.
Subtraction | Subtracts two Ranges by subtracting each of their components individually.
Top
Fields
 | Name | Description
Public field | MaxValue | The maximum value of this Range.
Public field | MinValue | The minimum value of this Range.
Top
Properties
 | Name | Description
Public property | Center | [GET] The center value of this Range.
Public property | Normalized | [GET] Returns a normalized version of this Range where the minimum is guaranteed to be smaller than the maximum value.
Public property | Width | [GET] The total width of this Range. This value may be negative for irregular ranges, i.e. ranges with a higher minimum value than their maximum value.
Top
See Also

Reference

Duality Namespace


Range Constructor

Range Constructor
Overload List
 | Name | Description
Public method | Range(Single) | Creates a new Range with zero-width from a single value.
Public method | Range(Single, Single) | Creates a new Range from mininmum and maximum values.
Top
See Also

Reference

Range Structure
Duality Namespace


Range Constructor (Single)

Range Constructor (Single)
Creates a new Range with zero-width from a single value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Range(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

Range Structure
Range Overload
Duality Namespace


Range Constructor (Single, Single)

Range Constructor (Single, Single)
Creates a new Range from mininmum and maximum values.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Range(
    float min,
    float max
)

Parameters

min
Type: SystemSingle
max
Type: SystemSingle
See Also

Reference

Range Structure
Range Overload
Duality Namespace


Range Fields

Range Fields

The Range type exposes the following members.

Fields
 | Name | Description
Public field | MaxValue | The maximum value of this Range.
Public field | MinValue | The minimum value of this Range.
Top
See Also

Reference

Range Structure
Duality Namespace


Range.MaxValue Field

RangeMaxValue Field
The maximum value of this Range.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxValue

Field Value

Type: Single
See Also

Reference

Range Structure
Duality Namespace


Range.MinValue Field

RangeMinValue Field
The minimum value of this Range.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinValue

Field Value

Type: Single
See Also

Reference

Range Structure
Duality Namespace


Range Methods

Range Methods

The Range type exposes the following members.

Methods
 | Name | Description
Public method | Contains(Single) | Returns whether this Range contains a certain value.
Public method | Contains(Range) | Returns whether this Range contains a certain other range.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Range) |
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Lerp | Performs a linear interpolation between the Ranges minimum and maximum value using the specified blend factor.
Public method | Normalize | Normalizes this Range, i.e. flips minimum and maximum value, if irregular.
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

Range Structure
Duality Namespace


Range.Contains Method

RangeContains Method
Overload List
 | Name | Description
Public method | Contains(Single) | Returns whether this Range contains a certain value.
Public method | Contains(Range) | Returns whether this Range contains a certain other range.
Top
See Also

Reference

Range Structure
Duality Namespace


Range.Contains Method (Single)

RangeContains Method (Single)
Returns whether this Range contains a certain value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Contains(
    float value
)

Parameters

value
Type: SystemSingle

Return Value

Type: Boolean
See Also

Reference

Range Structure
Contains Overload
Duality Namespace


Range.Contains Method (Range)

RangeContains Method (Range)
Returns whether this Range contains a certain other range.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Contains(
    Range value
)

Parameters

value
Type: DualityRange

Return Value

Type: Boolean
See Also

Reference

Range Structure
Contains Overload
Duality Namespace


Range.Equals Method

RangeEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Range) |
Top
See Also

Reference

Range Structure
Duality Namespace


Range.Equals Method (Object)

RangeEquals Method (Object)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

Range Structure
Equals Overload
Duality Namespace


Range.Equals Method (Range)

RangeEquals Method (Range)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Equals(
    Range other
)

Parameters

other
Type: DualityRange

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

Range Structure
Equals Overload
Duality Namespace


Range.GetHashCode Method

RangeGetHashCode Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

Range Structure
Duality Namespace


Range.Lerp Method

RangeLerp Method
Performs a linear interpolation between the Ranges minimum and maximum value using the specified blend factor.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Lerp(
    float ratio
)

Parameters

ratio
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

Range Structure
Duality Namespace


Range.Normalize Method

RangeNormalize Method
Normalizes this Range, i.e. flips minimum and maximum value, if irregular.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Range Structure
Duality Namespace


Range.ToString Method

RangeToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Range Structure
Duality Namespace


Range Operators and Type Conversions

Range Operators and Type Conversions

The Range type exposes the following members.

Operators
Name | Description
Addition | Adds two Ranges by adding each of their components individually.
Division | Divides two Ranges by dividing each of their components individually.
Equality | Returns whether two Ranges are equal.
(Single to Range) | Performs an implicit conversion from a single value to a ranged value.
Inequality | Returns whether two Ranges are inequal.
Multiply | Multiplies two Ranges by multiplying each of their components individually.
Subtraction | Subtracts two Ranges by subtracting each of their components individually.
Top
See Also

Reference

Range Structure
Duality Namespace


Range.Addition Operator

RangeAddition Operator
Adds two Ranges by adding each of their components individually.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Range operator +(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range.Division Operator

RangeDivision Operator
Divides two Ranges by dividing each of their components individually.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Range operator /(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range.Equality Operator

RangeEquality Operator
Returns whether two Ranges are equal.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator ==(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Boolean
See Also

Reference

Range Structure
Duality Namespace


Range Implicit Conversion (Single to Range)

Range Conversion (Single to Range)
Performs an implicit conversion from a single value to a ranged value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static implicit operator Range (
    float value
)

Parameters

value
Type: SystemSingle

Return Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range.Inequality Operator

RangeInequality Operator
Returns whether two Ranges are inequal.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator !=(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Boolean
See Also

Reference

Range Structure
Duality Namespace


Range.Multiply Operator

RangeMultiply Operator
Multiplies two Ranges by multiplying each of their components individually.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Range operator *(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range.Subtraction Operator

RangeSubtraction Operator
Subtracts two Ranges by subtracting each of their components individually.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Range operator -(
    Range left,
    Range right
)

Parameters

left
Type: DualityRange
right
Type: DualityRange

Return Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range Properties

Range Properties

The Range type exposes the following members.

Properties
 | Name | Description
Public property | Center | [GET] The center value of this Range.
Public property | Normalized | [GET] Returns a normalized version of this Range where the minimum is guaranteed to be smaller than the maximum value.
Public property | Width | [GET] The total width of this Range. This value may be negative for irregular ranges, i.e. ranges with a higher minimum value than their maximum value.
Top
See Also

Reference

Range Structure
Duality Namespace


Range.Center Property

RangeCenter Property
[GET] The center value of this Range.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Center { get; }

Property Value

Type: Single
See Also

Reference

Range Structure
Duality Namespace


Range.Normalized Property

RangeNormalized Property
[GET] Returns a normalized version of this Range where the minimum is guaranteed to be smaller than the maximum value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Range Normalized { get; }

Property Value

Type: Range
See Also

Reference

Range Structure
Duality Namespace


Range.Width Property

RangeWidth Property
[GET] The total width of this Range. This value may be negative for irregular ranges, i.e. ranges with a higher minimum value than their maximum value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Width { get; }

Property Value

Type: Single
See Also

Reference

Range Structure
Duality Namespace


RawList(T) Class

RawListT Class
Encapsulates an Array and provides methods for dynamically modifying it similar to a List{T}, but allows accessing its raw internal data at the same time. This can be useful for situations wherer raw data access may significantly improve performance, but dynamic sizes are still required.
Inheritance Hierarchy
SystemObject
DualityRawListT

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RawList<T> : IList<T>, ICollection<T>,
    IList, ICollection, IReadOnlyList, IReadOnlyCollection, IEnumerable<T>,
    IEnumerable

Type Parameters

T

The RawListT type exposes the following members.

Constructors
 | Name | Description
Public method | RawListT | Creates a new, empty list.
Public method | RawListT(IEnumerableT) | Creates a new list with the specified contents.
Public method | RawListT(Int32) | Creates a new list with the specified capacity.
Public method | RawListT(T) | Creates a new list that wraps the specified array. Does not copy the array.
Public method | RawListT(RawListT) | Creates a new list that is a copy of the specified source list.
Public method | RawListT(T, Int32) | Creates a new list that wraps the specified array. Does not copy the array.
Top
Methods
 | Name | Description
Public method | Add | Adds a new item to the list.
Public method | AddRange(IEnumerableT) | Adds a range of new items to the list.
Public method | AddRange(T) | Adds a range of new items to the list.
Public method | Clear | Clears the entire list of its contents and resets its size to zero.
Public method | Contains | Returns whether the specified item is contained within the used range of the internal array.
Public method | CopyTo(T, Int32) | Copies the contents of this collection to the specified array.
Public method | CopyTo(RawListT, Int32, Int32) | Copies the contents of this list to the specified target list. The target list size will be increased when necessary to fit all copied contents of the source list inside it at the specified index.
Public method | GetEnumerator |
Public method | IndexOf | Returns the first index of the specified item within the used range of the internal array. Returns -1, if not found.
Public method | Insert | Inserts a new item at a specified index.
Public method | InsertRange(Int32, IEnumerableT) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T, Int32, Int32) | Inserts a range of new items at a specified index.
Public method | Move | Moves a range of elements by a certain value and resets the indices that now remain empty.
Public method | Remove | Removes the first matchin item from the list.
Public method | RemoveAll | Removes the first matchin item from the list.
Public method | RemoveAt | Removes the element at the specified index.
Public method | RemoveRange | Removes a range of elements at the specified index.
Public method | Reserve | Makes sure that the lists internal array has storage space for at least the specified amount of elements.
Public method | ShrinkToFit | Shrinks the lists internal array to the current minimum size.
Public method | Sort | Sorts the entire list.
Public method | Sort(ComparerT) | Sorts the entire list using a specific comparer.
Public method | Sort(ComparisonT) | Sorts the entire list using a specific comparison.
Public method | Sort(Int32, Int32) | Sorts a certain range of the list.
Public method | Sort(Int32, Int32, IComparerT) | Sorts a certain range of the list using a specific comparer.
Public method | Sort(Int32, Int32, ComparisonT) | Sorts a certain range of the list using a specific comparison.
Top
Extension Methods
 | Name | Description
Public Extension Method | GetCombinedHashCodeT | Returns the combined hash code of the specified list. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstT(T) | Overloaded. Returns the index of the first object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstT(PredicateT) | Overloaded. Returns the index of the first object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastT(T) | Overloaded. Returns the index of the last object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastT(PredicateT) | Overloaded. Returns the index of the last object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ShuffleT | Shuffles the specified eumerable. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | StableSortT | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(IComparerT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(ComparisonT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32, IComparerT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32, ComparisonT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
Properties
 | Name | Description
Public property | Capacity | [GET] Length of the internal Data array.
Public property | Count | [GET / SET] The number of used indices within the internal Data array. Setting this to a higher value may cause the list to grow its internal array. Decreasing this value does not reset "removed" elements of the internal array to their default value.
Public property | Data | [GET / SET] The lists internal array for data storage. Assigning an array that is shorter than Count will result in Count being automatically adjusted. Assigning a larger array will not affect Count. Assigning null will internally create a zero-length array.
Public property | Item | [GET / SET] A safety-checked index accessor to the lists internal array. Will throw an IndexOutOfRangeException when attempting to access indices exceeding Count.
Top
Remarks
Use this class with caution and consideration. In almost all cases, either a List{T} or a regular Array should be preferred. You should only use this class when you know how to use it.
See Also

Reference

Duality Namespace


RawList(T) Constructor

RawListT Constructor
Overload List
 | Name | Description
Public method | RawListT | Creates a new, empty list.
Public method | RawListT(IEnumerableT) | Creates a new list with the specified contents.
Public method | RawListT(Int32) | Creates a new list with the specified capacity.
Public method | RawListT(T) | Creates a new list that wraps the specified array. Does not copy the array.
Public method | RawListT(RawListT) | Creates a new list that is a copy of the specified source list.
Public method | RawListT(T, Int32) | Creates a new list that wraps the specified array. Does not copy the array.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T) Constructor

RawListT Constructor
Creates a new, empty list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList()
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Constructor (IEnumerable(T))

RawListT Constructor (IEnumerableT)
Creates a new list with the specified contents.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList(
    IEnumerable<T> data
)

Parameters

data
Type: System.Collections.GenericIEnumerable T
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Constructor (Int32)

RawListT Constructor (Int32)
Creates a new list with the specified capacity.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList(
    int capacity
)

Parameters

capacity
Type: SystemInt32
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Constructor (T[])

RawListT Constructor (T)
Creates a new list that wraps the specified array. Does not copy the array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList(
    T[] wrapAround
)

Parameters

wrapAround
Type: T
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Constructor (RawList(T))

RawListT Constructor (RawListT)
Creates a new list that is a copy of the specified source list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList(
    RawList<T> source
)

Parameters

source
Type: DualityRawList T
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Constructor (T[], Int32)

RawListT Constructor (T, Int32)
Creates a new list that wraps the specified array. Does not copy the array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RawList(
    T[] wrapAround,
    int count
)

Parameters

wrapAround
Type: T
count
Type: SystemInt32
See Also

Reference

RawListT Class
RawListT Overload
Duality Namespace


RawList(T) Methods

RawListT Methods

The RawListT generic type exposes the following members.

Methods
 | Name | Description
Public method | Add | Adds a new item to the list.
Public method | AddRange(IEnumerableT) | Adds a range of new items to the list.
Public method | AddRange(T) | Adds a range of new items to the list.
Public method | Clear | Clears the entire list of its contents and resets its size to zero.
Public method | Contains | Returns whether the specified item is contained within the used range of the internal array.
Public method | CopyTo(T, Int32) | Copies the contents of this collection to the specified array.
Public method | CopyTo(RawListT, Int32, Int32) | Copies the contents of this list to the specified target list. The target list size will be increased when necessary to fit all copied contents of the source list inside it at the specified index.
Public method | GetEnumerator |
Public method | IndexOf | Returns the first index of the specified item within the used range of the internal array. Returns -1, if not found.
Public method | Insert | Inserts a new item at a specified index.
Public method | InsertRange(Int32, IEnumerableT) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T, Int32, Int32) | Inserts a range of new items at a specified index.
Public method | Move | Moves a range of elements by a certain value and resets the indices that now remain empty.
Public method | Remove | Removes the first matchin item from the list.
Public method | RemoveAll | Removes the first matchin item from the list.
Public method | RemoveAt | Removes the element at the specified index.
Public method | RemoveRange | Removes a range of elements at the specified index.
Public method | Reserve | Makes sure that the lists internal array has storage space for at least the specified amount of elements.
Public method | ShrinkToFit | Shrinks the lists internal array to the current minimum size.
Public method | Sort | Sorts the entire list.
Public method | Sort(ComparerT) | Sorts the entire list using a specific comparer.
Public method | Sort(ComparisonT) | Sorts the entire list using a specific comparison.
Public method | Sort(Int32, Int32) | Sorts a certain range of the list.
Public method | Sort(Int32, Int32, IComparerT) | Sorts a certain range of the list using a specific comparer.
Public method | Sort(Int32, Int32, ComparisonT) | Sorts a certain range of the list using a specific comparison.
Top
Extension Methods
 | Name | Description
Public Extension Method | GetCombinedHashCodeT | Returns the combined hash code of the specified list. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstT(T) | Overloaded. Returns the index of the first object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstT(PredicateT) | Overloaded. Returns the index of the first object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastT(T) | Overloaded. Returns the index of the last object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastT(PredicateT) | Overloaded. Returns the index of the last object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | NotNullT | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeT | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualT(IEnumerableT, IEqualityComparerT) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ShuffleT | Shuffles the specified eumerable. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | StableSortT | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(IComparerT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(ComparisonT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32, IComparerT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortT(Int32, Int32, ComparisonT) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | ToStringT(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringT(FuncT, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Add Method

RawListTAdd Method
Adds a new item to the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Add(
    T item
)

Parameters

item
Type: T

Implements

ICollectionTAdd(T)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).AddRange Method

RawListTAddRange Method
Overload List
 | Name | Description
Public method | AddRange(IEnumerableT) | Adds a range of new items to the list.
Public method | AddRange(T) | Adds a range of new items to the list.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).AddRange Method (IEnumerable(T))

RawListTAddRange Method (IEnumerableT)
Adds a range of new items to the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddRange(
    IEnumerable<T> items
)

Parameters

items
Type: System.Collections.GenericIEnumerable T
See Also

Reference

RawListT Class
AddRange Overload
Duality Namespace


RawList(T).AddRange Method (T[])

RawListTAddRange Method (T)
Adds a range of new items to the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddRange(
    T[] items
)

Parameters

items
Type: T
See Also

Reference

RawListT Class
AddRange Overload
Duality Namespace


RawList(T).Clear Method

RawListTClear Method
Clears the entire list of its contents and resets its size to zero.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()

Implements

ICollectionTClear
IListClear
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Contains Method

RawListTContains Method
Returns whether the specified item is contained within the used range of the internal array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Contains(
    T item
)

Parameters

item
Type: T

Return Value

Type: Boolean

Implements

ICollectionTContains(T)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).CopyTo Method

RawListTCopyTo Method
Overload List
 | Name | Description
Public method | CopyTo(T, Int32) | Copies the contents of this collection to the specified array.
Public method | CopyTo(RawListT, Int32, Int32) | Copies the contents of this list to the specified target list. The target list size will be increased when necessary to fit all copied contents of the source list inside it at the specified index.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).CopyTo Method (T[], Int32)

RawListTCopyTo Method (T, Int32)
Copies the contents of this collection to the specified array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    T[] array,
    int arrayIndex
)

Parameters

array
Type: T
arrayIndex
Type: SystemInt32

Implements

ICollectionTCopyTo(T, Int32)
See Also

Reference

RawListT Class
CopyTo Overload
Duality Namespace


RawList(T).CopyTo Method (RawList(T), Int32, Int32)

RawListTCopyTo Method (RawListT, Int32, Int32)
Copies the contents of this list to the specified target list. The target list size will be increased when necessary to fit all copied contents of the source list inside it at the specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    RawList<T> target,
    int targetIndex,
    int count
)

Parameters

target
Type: DualityRawList T
targetIndex
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

RawListT Class
CopyTo Overload
Duality Namespace


RawList(T).GetEnumerator Method

RawListTGetEnumerator Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerator<T> GetEnumerator()

Return Value

Type: IEnumerator T

Implements

IEnumerableTGetEnumerator
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).IndexOf Method

RawListTIndexOf Method
Returns the first index of the specified item within the used range of the internal array. Returns -1, if not found.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int IndexOf(
    T item
)

Parameters

item
Type: T

Return Value

Type: Int32

Implements

IListTIndexOf(T)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Insert Method

RawListTInsert Method
Inserts a new item at a specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Insert(
    int targetIndex,
    T item
)

Parameters

targetIndex
Type: SystemInt32
The index at which to insert the new items.
item
Type: T
The source item to insert.

Implements

IListTInsert(Int32, T)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).InsertRange Method

RawListTInsertRange Method
Overload List
 | Name | Description
Public method | InsertRange(Int32, IEnumerableT) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T) | Inserts a range of new items at a specified index.
Public method | InsertRange(Int32, T, Int32, Int32) | Inserts a range of new items at a specified index.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).InsertRange Method (Int32, IEnumerable(T))

RawListTInsertRange Method (Int32, IEnumerableT)
Inserts a range of new items at a specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InsertRange(
    int targetIndex,
    IEnumerable<T> items
)

Parameters

targetIndex
Type: SystemInt32
The index at which to insert the new items.
items
Type: System.Collections.GenericIEnumerable T
The source enumerable to copy items from.
See Also

Reference

RawListT Class
InsertRange Overload
Duality Namespace


RawList(T).InsertRange Method (Int32, T[])

RawListTInsertRange Method (Int32, T)
Inserts a range of new items at a specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InsertRange(
    int targetIndex,
    T[] items
)

Parameters

targetIndex
Type: SystemInt32
The index at which to insert the new items.
items
Type: T
The source array to copy items from.
See Also

Reference

RawListT Class
InsertRange Overload
Duality Namespace


RawList(T).InsertRange Method (Int32, T[], Int32, Int32)

RawListTInsertRange Method (Int32, T, Int32, Int32)
Inserts a range of new items at a specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void InsertRange(
    int targetIndex,
    T[] items,
    int sourceIndex,
    int count
)

Parameters

targetIndex
Type: SystemInt32
The index at which to insert the new items.
items
Type: T
The source array to copy items from.
sourceIndex
Type: SystemInt32
Index in the source array from which to copy items.
count
Type: SystemInt32
The number of items to insert.
See Also

Reference

RawListT Class
InsertRange Overload
Duality Namespace


RawList(T).Move Method

RawListTMove Method
Moves a range of elements by a certain value and resets the indices that now remain empty.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Move(
    int index,
    int count,
    int moveBy
)

Parameters

index
Type: SystemInt32
count
Type: SystemInt32
moveBy
Type: SystemInt32
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Remove Method

RawListTRemove Method
Removes the first matchin item from the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Remove(
    T item
)

Parameters

item
Type: T

Return Value

Type: Boolean

Implements

ICollectionTRemove(T)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).RemoveAll Method

RawListTRemoveAll Method
Removes the first matchin item from the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int RemoveAll(
    Predicate<T> predicate
)

Parameters

predicate
Type: SystemPredicate T

Return Value

Type: Int32
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).RemoveAt Method

RawListTRemoveAt Method
Removes the element at the specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveAt(
    int index
)

Parameters

index
Type: SystemInt32

Implements

IListTRemoveAt(Int32)
IListRemoveAt(Int32)
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).RemoveRange Method

RawListTRemoveRange Method
Removes a range of elements at the specified index.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveRange(
    int index,
    int count
)

Parameters

index
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Reserve Method

RawListTReserve Method
Makes sure that the lists internal array has storage space for at least the specified amount of elements.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Reserve(
    int capacity
)

Parameters

capacity
Type: SystemInt32
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).ShrinkToFit Method

RawListTShrinkToFit Method
Shrinks the lists internal array to the current minimum size.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ShrinkToFit()
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Sort Method

RawListTSort Method
Overload List
 | Name | Description
Public method | Sort | Sorts the entire list.
Public method | Sort(ComparerT) | Sorts the entire list using a specific comparer.
Public method | Sort(ComparisonT) | Sorts the entire list using a specific comparison.
Public method | Sort(Int32, Int32) | Sorts a certain range of the list.
Public method | Sort(Int32, Int32, IComparerT) | Sorts a certain range of the list using a specific comparer.
Public method | Sort(Int32, Int32, ComparisonT) | Sorts a certain range of the list using a specific comparison.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Sort Method

RawListTSort Method
Sorts the entire list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort()
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T).Sort Method (Comparer(T))

RawListTSort Method (ComparerT)
Sorts the entire list using a specific comparer.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort(
    Comparer<T> comparer
)

Parameters

comparer
Type: System.Collections.GenericComparer T
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T).Sort Method (Comparison(T))

RawListTSort Method (ComparisonT)
Sorts the entire list using a specific comparison.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort(
    Comparison<T> comparison
)

Parameters

comparison
Type: SystemComparison T
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T).Sort Method (Int32, Int32)

RawListTSort Method (Int32, Int32)
Sorts a certain range of the list.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort(
    int index,
    int count
)

Parameters

index
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T).Sort Method (Int32, Int32, IComparer(T))

RawListTSort Method (Int32, Int32, IComparerT)
Sorts a certain range of the list using a specific comparer.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort(
    int index,
    int count,
    IComparer<T> comparer
)

Parameters

index
Type: SystemInt32
count
Type: SystemInt32
comparer
Type: System.Collections.GenericIComparer T
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T).Sort Method (Int32, Int32, Comparison(T))

RawListTSort Method (Int32, Int32, ComparisonT)
Sorts a certain range of the list using a specific comparison.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Sort(
    int index,
    int count,
    Comparison<T> comparison
)

Parameters

index
Type: SystemInt32
count
Type: SystemInt32
comparison
Type: SystemComparison T
See Also

Reference

RawListT Class
Sort Overload
Duality Namespace


RawList(T) Properties

RawListT Properties

The RawListT generic type exposes the following members.

Properties
 | Name | Description
Public property | Capacity | [GET] Length of the internal Data array.
Public property | Count | [GET / SET] The number of used indices within the internal Data array. Setting this to a higher value may cause the list to grow its internal array. Decreasing this value does not reset "removed" elements of the internal array to their default value.
Public property | Data | [GET / SET] The lists internal array for data storage. Assigning an array that is shorter than Count will result in Count being automatically adjusted. Assigning a larger array will not affect Count. Assigning null will internally create a zero-length array.
Public property | Item | [GET / SET] A safety-checked index accessor to the lists internal array. Will throw an IndexOutOfRangeException when attempting to access indices exceeding Count.
Top
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Capacity Property

RawListTCapacity Property
[GET] Length of the internal Data array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Capacity { get; }

Property Value

Type: Int32
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Count Property

RawListTCount Property
[GET / SET] The number of used indices within the internal Data array. Setting this to a higher value may cause the list to grow its internal array. Decreasing this value does not reset "removed" elements of the internal array to their default value.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Count { get; set; }

Property Value

Type: Int32

Implements

ICollectionTCount
ICollectionCount
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Data Property

RawListTData Property
[GET / SET] The lists internal array for data storage. Assigning an array that is shorter than Count will result in Count being automatically adjusted. Assigning a larger array will not affect Count. Assigning null will internally create a zero-length array.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T[] Data { get; set; }

Property Value

Type: T
See Also

Reference

RawListT Class
Duality Namespace


RawList(T).Item Property

RawListTItem Property
[GET / SET] A safety-checked index accessor to the lists internal array. Will throw an IndexOutOfRangeException when attempting to access indices exceeding Count.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T this[
    int index
] { get; set; }

Parameters

index
Type: SystemInt32

Return Value

Type: T

Implements

IListTItemInt32
See Also

Reference

RawListT Class
Duality Namespace


Rect Structure

Rect Structure
Describes a rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Rect : IEquatable<Rect>

The Rect type exposes the following members.

Constructors
 | Name | Description
Public method | Rect(Vector2) | Creates a Rect of the given size.
Public method | Rect(Single, Single) | Creates a Rect of the given size.
Public method | Rect(Single, Single, Single, Single) | Creates a Rect of the given size and position.
Top
Methods
 | Name | Description
 | Align | Creates a Rect using x and y Coordinates that are assumed to be aligned as specified.
Public method | Contains(Rect) | Returns whether this Rect contains a given rectangular area.
Public method | Contains(Vector2) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single, Single, Single) | Returns whether this Rect contains a given rectangular area.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Rect) | Tests if two Rects are equal.
Public method | ExpandedToContain(Rect) | Returns a new version of this Rect that has been expanded to contain the specified Rect.
Public method | ExpandedToContain(Vector2) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single, Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified rectangular area.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Intersection(Rect) | Returns a Rect that equals this Rects intersection with another Rect.
Public method | Intersection(Single, Single, Single, Single) | Returns a Rect that equals this Rects intersection with another Rect.
Public method | Intersects(Rect) | Returns whether this Rect intersects a given rectangular area.
Public method | Intersects(Single, Single, Single, Single) | Returns whether this Rect intersects a given rectangular area.
Public method | Normalized | Returns a normalized version of the rect, i.e. one with a positive width and height.
Public method | Scaled(Vector2) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Public method | Scaled(Single, Single) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | Transformed(Vector2) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Public method | Transformed(Single, Single) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Public method | WithOffset(Vector2) | Returns a new version of this Rect that has been moved by the specified offset.
Public method | WithOffset(Single, Single) | Returns a new version of this Rect that has been moved by the specified offset.
Top
Operators
Name | Description
Equality | Returns whether two Rects are equal.
Inequality | Returns whether two Rects are unequal.
Top
Fields
 | Name | Description
 | Empty | An empty Rect.
Public field | H | The Rects height.
Public field | W | The Rects width.
Public field | X | The Rects x-Coordinate.
Public field | Y | The Rects y-Coordinate.
Top
Properties
 | Name | Description
Public property | BottomLeft | [GET] The Rects bottom left coordinates
Public property | BottomRight | [GET] The Rects bottom right coordinates
Public property | BottomY | [GET] The maximum y-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | BoundingRadius | [GET] If this Rect was to fit inside a bounding circle originating from [0,0], this would be its radius.
Public property | Center | [GET] The Rects center coordinates
Public property | CenterX | [GET] The center x-Coordinate occupied by the Rect.
Public property | CenterY | [GET] The center y-Coordinate occupied by the Rect.
Public property | LeftX | [GET] The minimum x-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | Pos | [GET / SET] The Rects position
Public property | RightX | [GET] The maximum x-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | Size | [GET / SET] The Rects size.
Public property | TopLeft | [GET] The Rects top left coordinates
Public property | TopRight | [GET] The Rects top right coordinates
Public property | TopY | [GET] The minimum y-Coordinate occupied by the Rect. Accounts for negative sizes.
Top
See Also

Reference

Duality Namespace


Rect Constructor

Rect Constructor
Overload List
 | Name | Description
Public method | Rect(Vector2) | Creates a Rect of the given size.
Public method | Rect(Single, Single) | Creates a Rect of the given size.
Public method | Rect(Single, Single, Single, Single) | Creates a Rect of the given size and position.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect Constructor (Vector2)

Rect Constructor (Vector2)
Creates a Rect of the given size.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect(
    Vector2 size
)

Parameters

size
Type: DualityVector2
See Also

Reference

Rect Structure
Rect Overload
Duality Namespace


Rect Constructor (Single, Single)

Rect Constructor (Single, Single)
Creates a Rect of the given size.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect(
    float w,
    float h
)

Parameters

w
Type: SystemSingle
h
Type: SystemSingle
See Also

Reference

Rect Structure
Rect Overload
Duality Namespace


Rect Constructor (Single, Single, Single, Single)

Rect Constructor (Single, Single, Single, Single)
Creates a Rect of the given size and position.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
w
Type: SystemSingle
h
Type: SystemSingle
See Also

Reference

Rect Structure
Rect Overload
Duality Namespace


Rect Fields

Rect Fields

The Rect type exposes the following members.

Fields
 | Name | Description
 | Empty | An empty Rect.
Public field | H | The Rects height.
Public field | W | The Rects width.
Public field | X | The Rects x-Coordinate.
Public field | Y | The Rects y-Coordinate.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Empty Field

RectEmpty Field
An empty Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Rect Empty

Field Value

Type: Rect
See Also

Reference

Rect Structure
Duality Namespace


Rect.H Field

RectH Field
The Rects height.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float H

Field Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.W Field

RectW Field
The Rects width.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float W

Field Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.X Field

RectX Field
The Rects x-Coordinate.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float X

Field Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.Y Field

RectY Field
The Rects y-Coordinate.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Y

Field Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect Methods

Rect Methods

The Rect type exposes the following members.

Methods
 | Name | Description
 | Align | Creates a Rect using x and y Coordinates that are assumed to be aligned as specified.
Public method | Contains(Rect) | Returns whether this Rect contains a given rectangular area.
Public method | Contains(Vector2) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single, Single, Single) | Returns whether this Rect contains a given rectangular area.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Rect) | Tests if two Rects are equal.
Public method | ExpandedToContain(Rect) | Returns a new version of this Rect that has been expanded to contain the specified Rect.
Public method | ExpandedToContain(Vector2) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single, Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified rectangular area.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | Intersection(Rect) | Returns a Rect that equals this Rects intersection with another Rect.
Public method | Intersection(Single, Single, Single, Single) | Returns a Rect that equals this Rects intersection with another Rect.
Public method | Intersects(Rect) | Returns whether this Rect intersects a given rectangular area.
Public method | Intersects(Single, Single, Single, Single) | Returns whether this Rect intersects a given rectangular area.
Public method | Normalized | Returns a normalized version of the rect, i.e. one with a positive width and height.
Public method | Scaled(Vector2) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Public method | Scaled(Single, Single) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | Transformed(Vector2) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Public method | Transformed(Single, Single) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Public method | WithOffset(Vector2) | Returns a new version of this Rect that has been moved by the specified offset.
Public method | WithOffset(Single, Single) | Returns a new version of this Rect that has been moved by the specified offset.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Align Method

RectAlign Method
Creates a Rect using x and y Coordinates that are assumed to be aligned as specified.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Rect Align(
    Alignment align,
    float x,
    float y,
    float w,
    float h
)

Parameters

align
Type: DualityAlignment
The alignment of the Rects x and y Coordinates.
x
Type: SystemSingle
The Rects x-Coordinate.
y
Type: SystemSingle
The Rects y-Coordinate.
w
Type: SystemSingle
The Rects width.
h
Type: SystemSingle
The Rects height.

Return Value

Type: Rect
See Also

Reference

Rect Structure
Duality Namespace


Rect.Contains Method

RectContains Method
Overload List
 | Name | Description
Public method | Contains(Rect) | Returns whether this Rect contains a given rectangular area.
Public method | Contains(Vector2) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single) | Returns whether this Rect contains a given point.
Public method | Contains(Single, Single, Single, Single) | Returns whether this Rect contains a given rectangular area.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Contains Method (Rect)

RectContains Method (Rect)
Returns whether this Rect contains a given rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Contains(
    Rect rect
)

Parameters

rect
Type: DualityRect
The Rect to test.

Return Value

Type: Boolean
True, if the Rect contains the other Rect, false if not.
See Also

Reference

Rect Structure
Contains Overload
Duality Namespace


Rect.Contains Method (Vector2)

RectContains Method (Vector2)
Returns whether this Rect contains a given point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Contains(
    Vector2 pos
)

Parameters

pos
Type: DualityVector2
The point to test.

Return Value

Type: Boolean
True, if the Rect contains the point, false if not.
See Also

Reference

Rect Structure
Contains Overload
Duality Namespace


Rect.Contains Method (Single, Single)

RectContains Method (Single, Single)
Returns whether this Rect contains a given point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Contains(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
x-Coordinate of the point to test.
y
Type: SystemSingle
y-Coordinate of the point to test.

Return Value

Type: Boolean
True, if the Rect contains the point, false if not.
See Also

Reference

Rect Structure
Contains Overload
Duality Namespace


Rect.Contains Method (Single, Single, Single, Single)

RectContains Method (Single, Single, Single, Single)
Returns whether this Rect contains a given rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Contains(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
x-Coordinate of the Rect to test.
y
Type: SystemSingle
y-Coordinate of the Rect to test.
w
Type: SystemSingle
Width of the Rect to test.
h
Type: SystemSingle
Height of the Rect to test.

Return Value

Type: Boolean
True, if the Rect contains the other Rect, false if not.
See Also

Reference

Rect Structure
Contains Overload
Duality Namespace


Rect.Equals Method

RectEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(Rect) | Tests if two Rects are equal.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Equals Method (Object)

RectEquals Method (Object)

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

Rect Structure
Equals Overload
Duality Namespace


Rect.Equals Method (Rect)

RectEquals Method (Rect)
Tests if two Rects are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Rect other
)

Parameters

other
Type: DualityRect

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

Rect Structure
Equals Overload
Duality Namespace


Rect.ExpandedToContain Method

RectExpandedToContain Method
Overload List
 | Name | Description
Public method | ExpandedToContain(Rect) | Returns a new version of this Rect that has been expanded to contain the specified Rect.
Public method | ExpandedToContain(Vector2) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified point.
Public method | ExpandedToContain(Single, Single, Single, Single) | Returns a new version of this Rect that has been expanded to contain the specified rectangular area.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.ExpandedToContain Method (Rect)

RectExpandedToContain Method (Rect)
Returns a new version of this Rect that has been expanded to contain the specified Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect ExpandedToContain(
    Rect other
)

Parameters

other
Type: DualityRect
The Rect to contain.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
ExpandedToContain Overload
Duality Namespace


Rect.ExpandedToContain Method (Vector2)

RectExpandedToContain Method (Vector2)
Returns a new version of this Rect that has been expanded to contain the specified point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect ExpandedToContain(
    Vector2 p
)

Parameters

p
Type: DualityVector2
The point to contain.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
ExpandedToContain Overload
Duality Namespace


Rect.ExpandedToContain Method (Single, Single)

RectExpandedToContain Method (Single, Single)
Returns a new version of this Rect that has been expanded to contain the specified point.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect ExpandedToContain(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
x-Coordinate of the point to contain.
y
Type: SystemSingle
y-Coordinate of the point to contain.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
ExpandedToContain Overload
Duality Namespace


Rect.ExpandedToContain Method (Single, Single, Single, Single)

RectExpandedToContain Method (Single, Single, Single, Single)
Returns a new version of this Rect that has been expanded to contain the specified rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect ExpandedToContain(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
x-Coordinate of the Rect to contain.
y
Type: SystemSingle
y-Coordinate of the Rect to contain.
w
Type: SystemSingle
Width of the Rect to contain.
h
Type: SystemSingle
Height of the Rect to contain.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
ExpandedToContain Overload
Duality Namespace


Rect.GetHashCode Method

RectGetHashCode Method

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

Rect Structure
Duality Namespace


Rect.Intersection Method

RectIntersection Method
Overload List
 | Name | Description
Public method | Intersection(Rect) | Returns a Rect that equals this Rects intersection with another Rect.
Public method | Intersection(Single, Single, Single, Single) | Returns a Rect that equals this Rects intersection with another Rect.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Intersection Method (Rect)

RectIntersection Method (Rect)
Returns a Rect that equals this Rects intersection with another Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Intersection(
    Rect rect
)

Parameters

rect
Type: DualityRect
The other Rect to intersect with.

Return Value

Type: Rect
A new Rect that describes both Rects intersection area. Empty, if there is no intersection.
See Also

Reference

Rect Structure
Intersection Overload
Duality Namespace


Rect.Intersection Method (Single, Single, Single, Single)

RectIntersection Method (Single, Single, Single, Single)
Returns a Rect that equals this Rects intersection with another Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Intersection(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
x-Coordinate of the Rect to intersect with.
y
Type: SystemSingle
y-Coordinate of the Rect to intersect with.
w
Type: SystemSingle
Width of the Rect to intersect with.
h
Type: SystemSingle
Height of the Rect to intersect with.

Return Value

Type: Rect
A new Rect that describes both Rects intersection area. Empty, if there is no intersection.
See Also

Reference

Rect Structure
Intersection Overload
Duality Namespace


Rect.Intersects Method

RectIntersects Method
Overload List
 | Name | Description
Public method | Intersects(Rect) | Returns whether this Rect intersects a given rectangular area.
Public method | Intersects(Single, Single, Single, Single) | Returns whether this Rect intersects a given rectangular area.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Intersects Method (Rect)

RectIntersects Method (Rect)
Returns whether this Rect intersects a given rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Intersects(
    Rect rect
)

Parameters

rect
Type: DualityRect
The Rect to test.

Return Value

Type: Boolean
True, if the Rect intersects the other Rect, false if not.
See Also

Reference

Rect Structure
Intersects Overload
Duality Namespace


Rect.Intersects Method (Single, Single, Single, Single)

RectIntersects Method (Single, Single, Single, Single)
Returns whether this Rect intersects a given rectangular area.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Intersects(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
x-Coordinate of the Rect to test.
y
Type: SystemSingle
y-Coordinate of the Rect to test.
w
Type: SystemSingle
Width of the Rect to test.
h
Type: SystemSingle
Height of the Rect to test.

Return Value

Type: Boolean
True, if the Rect intersects the other Rect, false if not.
See Also

Reference

Rect Structure
Intersects Overload
Duality Namespace


Rect.Normalized Method

RectNormalized Method
Returns a normalized version of the rect, i.e. one with a positive width and height.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Normalized()

Return Value

Type: Rect
See Also

Reference

Rect Structure
Duality Namespace


Rect.Scaled Method

RectScaled Method
Overload List
 | Name | Description
Public method | Scaled(Vector2) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Public method | Scaled(Single, Single) | Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Scaled Method (Vector2)

RectScaled Method (Vector2)
Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Scaled(
    Vector2 factor
)

Parameters

factor
Type: DualityVector2
Scale factor.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
Scaled Overload
Duality Namespace


Rect.Scaled Method (Single, Single)

RectScaled Method (Single, Single)
Returns a new version of this Rect that has been scaled by the specified factor. Scaling only affects a Rects size, not its position.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Scaled(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
x-Scale factor.
y
Type: SystemSingle
y-Scale factor.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
Scaled Overload
Duality Namespace


Rect.ToString Method

RectToString Method

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Rect Structure
Duality Namespace


Rect.Transformed Method

RectTransformed Method
Overload List
 | Name | Description
Public method | Transformed(Vector2) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Public method | Transformed(Single, Single) | Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Transformed Method (Vector2)

RectTransformed Method (Vector2)
Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Transformed(
    Vector2 scale
)

Parameters

scale
Type: DualityVector2
Scale factor.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
Transformed Overload
Duality Namespace


Rect.Transformed Method (Single, Single)

RectTransformed Method (Single, Single)
Returns a new version of this Rect that has been transformed by the specified scale factor. Transforming both affects a Rects size and position.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect Transformed(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
x-Scale factor.
y
Type: SystemSingle
y-Scale factor.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
Transformed Overload
Duality Namespace


Rect.WithOffset Method

RectWithOffset Method
Overload List
 | Name | Description
Public method | WithOffset(Vector2) | Returns a new version of this Rect that has been moved by the specified offset.
Public method | WithOffset(Single, Single) | Returns a new version of this Rect that has been moved by the specified offset.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.WithOffset Method (Vector2)

RectWithOffset Method (Vector2)
Returns a new version of this Rect that has been moved by the specified offset.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect WithOffset(
    Vector2 offset
)

Parameters

offset
Type: DualityVector2
Movement vector.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
WithOffset Overload
Duality Namespace


Rect.WithOffset Method (Single, Single)

RectWithOffset Method (Single, Single)
Returns a new version of this Rect that has been moved by the specified offset.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Rect WithOffset(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
Movement in x-Direction.
y
Type: SystemSingle
Movement in y-Direction.

Return Value

Type: Rect
A new Rect with the specified adjustments.
See Also

Reference

Rect Structure
WithOffset Overload
Duality Namespace


Rect Operators

Rect Operators

The Rect type exposes the following members.

Operators
Name | Description
Equality | Returns whether two Rects are equal.
Inequality | Returns whether two Rects are unequal.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.Equality Operator

RectEquality Operator
Returns whether two Rects are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Rect left,
    Rect right
)

Parameters

left
Type: DualityRect
The first Rect.
right
Type: DualityRect
The second Rect.

Return Value

Type: Boolean
See Also

Reference

Rect Structure
Duality Namespace


Rect.Inequality Operator

RectInequality Operator
Returns whether two Rects are unequal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Rect left,
    Rect right
)

Parameters

left
Type: DualityRect
The first Rect.
right
Type: DualityRect
The second Rect.

Return Value

Type: Boolean
See Also

Reference

Rect Structure
Duality Namespace


Rect Properties

Rect Properties

The Rect type exposes the following members.

Properties
 | Name | Description
Public property | BottomLeft | [GET] The Rects bottom left coordinates
Public property | BottomRight | [GET] The Rects bottom right coordinates
Public property | BottomY | [GET] The maximum y-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | BoundingRadius | [GET] If this Rect was to fit inside a bounding circle originating from [0,0], this would be its radius.
Public property | Center | [GET] The Rects center coordinates
Public property | CenterX | [GET] The center x-Coordinate occupied by the Rect.
Public property | CenterY | [GET] The center y-Coordinate occupied by the Rect.
Public property | LeftX | [GET] The minimum x-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | Pos | [GET / SET] The Rects position
Public property | RightX | [GET] The maximum x-Coordinate occupied by the Rect. Accounts for negative sizes.
Public property | Size | [GET / SET] The Rects size.
Public property | TopLeft | [GET] The Rects top left coordinates
Public property | TopRight | [GET] The Rects top right coordinates
Public property | TopY | [GET] The minimum y-Coordinate occupied by the Rect. Accounts for negative sizes.
Top
See Also

Reference

Rect Structure
Duality Namespace


Rect.BottomLeft Property

RectBottomLeft Property
[GET] The Rects bottom left coordinates

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 BottomLeft { get; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.BottomRight Property

RectBottomRight Property
[GET] The Rects bottom right coordinates

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 BottomRight { get; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.BottomY Property

RectBottomY Property
[GET] The maximum y-Coordinate occupied by the Rect. Accounts for negative sizes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float BottomY { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.BoundingRadius Property

RectBoundingRadius Property
[GET] If this Rect was to fit inside a bounding circle originating from [0,0], this would be its radius.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float BoundingRadius { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.Center Property

RectCenter Property
[GET] The Rects center coordinates

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Center { get; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.CenterX Property

RectCenterX Property
[GET] The center x-Coordinate occupied by the Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float CenterX { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.CenterY Property

RectCenterY Property
[GET] The center y-Coordinate occupied by the Rect.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float CenterY { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.LeftX Property

RectLeftX Property
[GET] The minimum x-Coordinate occupied by the Rect. Accounts for negative sizes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float LeftX { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.Pos Property

RectPos Property
[GET / SET] The Rects position

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Pos { get; set; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.RightX Property

RectRightX Property
[GET] The maximum x-Coordinate occupied by the Rect. Accounts for negative sizes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float RightX { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


Rect.Size Property

RectSize Property
[GET / SET] The Rects size.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Size { get; set; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.TopLeft Property

RectTopLeft Property
[GET] The Rects top left coordinates

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 TopLeft { get; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.TopRight Property

RectTopRight Property
[GET] The Rects top right coordinates

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 TopRight { get; }

Property Value

Type: Vector2
See Also

Reference

Rect Structure
Duality Namespace


Rect.TopY Property

RectTopY Property
[GET] The minimum y-Coordinate occupied by the Rect. Accounts for negative sizes.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float TopY { get; }

Property Value

Type: Single
See Also

Reference

Rect Structure
Duality Namespace


ReflectionHelper Class

ReflectionHelper Class
Provides reflection-related helper methods.
Inheritance Hierarchy
SystemObject
DualityReflectionHelper

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ReflectionHelper

The ReflectionHelper type exposes the following members.

Methods
Name | Description
CanReferenceResource | Returns whether a certain Resource Type is able to reference another specific Resource Type. This is a pure optimization method that doesn't guarantee exact information in all cases - returns true, when in doubt.
CleanEventBindings(Object, Assembly) | Cleans the specified object instance from event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
CleanEventBindings(Type, Assembly) | Cleans the specified class from static event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
GetAttributesCachedT | Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.
GetMemberId | Returns a string describing a certain Member of a Type.
GetShortAssemblyName(Assembly) | Returns the short version of an Assembly name.
GetShortAssemblyName(AssemblyName) | Returns the short version of an Assembly name.
GetShortAssemblyName(String) | Returns the short version of an Assembly name.
GetTypeCSCodeName | Returns a string describing a certain Type.
GetTypeId | Returns a string describing a certain Type.
HasAttributeCachedT | Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.
IsPlainOldData | Returns whether the specified type is a primitive, enum, string, decimal, or struct that consists only of those types.
ResolveMember | Resolves a Member based on its member id.
ResolveType | Resolves a Type based on its type id.
SplitArgs | Performs a selective split operation on the specified string. Intended to be used on hierarchial argument lists.
VisitObjectsDeepT | Visits all fields of an object and all its sub-objects in order to find and / or adjust values of a certain Type. This is likely to be a very expensive operation.
Top
Events
Name | Description
MemberResolve | Fired when automatically resolving a certain Member has failed. Allows any subscriber to provide a suitable match.
TypeResolve | Fired when automatically resolving a certain Type has failed. Allows any subscriber to provide a suitable match.
Top
See Also

Reference

Duality Namespace


ReflectionHelper Methods

ReflectionHelper Methods

The ReflectionHelper type exposes the following members.

Methods
Name | Description
CanReferenceResource | Returns whether a certain Resource Type is able to reference another specific Resource Type. This is a pure optimization method that doesn't guarantee exact information in all cases - returns true, when in doubt.
CleanEventBindings(Object, Assembly) | Cleans the specified object instance from event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
CleanEventBindings(Type, Assembly) | Cleans the specified class from static event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
GetAttributesCachedT | Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.
GetMemberId | Returns a string describing a certain Member of a Type.
GetShortAssemblyName(Assembly) | Returns the short version of an Assembly name.
GetShortAssemblyName(AssemblyName) | Returns the short version of an Assembly name.
GetShortAssemblyName(String) | Returns the short version of an Assembly name.
GetTypeCSCodeName | Returns a string describing a certain Type.
GetTypeId | Returns a string describing a certain Type.
HasAttributeCachedT | Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.
IsPlainOldData | Returns whether the specified type is a primitive, enum, string, decimal, or struct that consists only of those types.
ResolveMember | Resolves a Member based on its member id.
ResolveType | Resolves a Type based on its type id.
SplitArgs | Performs a selective split operation on the specified string. Intended to be used on hierarchial argument lists.
VisitObjectsDeepT | Visits all fields of an object and all its sub-objects in order to find and / or adjust values of a certain Type. This is likely to be a very expensive operation.
Top
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.CanReferenceResource Method

ReflectionHelperCanReferenceResource Method
Returns whether a certain Resource Type is able to reference another specific Resource Type. This is a pure optimization method that doesn't guarantee exact information in all cases - returns true, when in doubt.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool CanReferenceResource(
    Type sourceResType,
    Type targetResType
)

Parameters

sourceResType
Type: SystemType
targetResType
Type: SystemType

Return Value

Type: Boolean
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.CleanEventBindings Method

ReflectionHelperCleanEventBindings Method
Overload List
Name | Description
CleanEventBindings(Object, Assembly) | Cleans the specified object instance from event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
CleanEventBindings(Type, Assembly) | Cleans the specified class from static event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.
Top
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.CleanEventBindings Method (Object, Assembly)

ReflectionHelperCleanEventBindings Method (Object, Assembly)
Cleans the specified object instance from event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool CleanEventBindings(
    Object targetObject,
    Assembly invalidAssembly
)

Parameters

targetObject
Type: SystemObject
invalidAssembly
Type: System.ReflectionAssembly

Return Value

Type: Boolean
Returns true, if any event binding was removed.
See Also

Reference

ReflectionHelper Class
CleanEventBindings Overload
Duality Namespace


ReflectionHelper.CleanEventBindings Method (Type, Assembly)

ReflectionHelperCleanEventBindings Method (Type, Assembly)
Cleans the specified class from static event bindings that lead to a specific invalid Assembly. This method is used to sweep forgotten event bindings upon plugin reload.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool CleanEventBindings(
    Type targetType,
    Assembly invalidAssembly
)

Parameters

targetType
Type: SystemType
invalidAssembly
Type: System.ReflectionAssembly

Return Value

Type: Boolean
Returns true, if any event binding was removed.
See Also

Reference

ReflectionHelper Class
CleanEventBindings Overload
Duality Namespace


ReflectionHelper.GetAttributesCached(T) Method

ReflectionHelperGetAttributesCachedT Method
Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> GetAttributesCached<T>(
    this MemberInfo member
)
where T : Attribute

Parameters

member
Type: System.ReflectionMemberInfo

Type Parameters

T

Return Value

Type: IEnumerable T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MemberInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.GetMemberId Method

ReflectionHelperGetMemberId Method
Returns a string describing a certain Member of a Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetMemberId(
    this MemberInfo member
)

Parameters

member
Type: System.ReflectionMemberInfo
The Member to describe.

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MemberInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.GetShortAssemblyName Method

ReflectionHelperGetShortAssemblyName Method
Overload List
Name | Description
GetShortAssemblyName(Assembly) | Returns the short version of an Assembly name.
GetShortAssemblyName(AssemblyName) | Returns the short version of an Assembly name.
GetShortAssemblyName(String) | Returns the short version of an Assembly name.
Top
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.GetShortAssemblyName Method (Assembly)

ReflectionHelperGetShortAssemblyName Method (Assembly)
Returns the short version of an Assembly name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetShortAssemblyName(
    this Assembly assembly
)

Parameters

assembly
Type: System.ReflectionAssembly

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Assembly. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
GetShortAssemblyName Overload
Duality Namespace


ReflectionHelper.GetShortAssemblyName Method (AssemblyName)

ReflectionHelperGetShortAssemblyName Method (AssemblyName)
Returns the short version of an Assembly name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetShortAssemblyName(
    this AssemblyName assemblyName
)

Parameters

assemblyName
Type: System.ReflectionAssemblyName

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type AssemblyName. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
GetShortAssemblyName Overload
Duality Namespace


ReflectionHelper.GetShortAssemblyName Method (String)

ReflectionHelperGetShortAssemblyName Method (String)
Returns the short version of an Assembly name.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetShortAssemblyName(
    string assemblyName
)

Parameters

assemblyName
Type: SystemString

Return Value

Type: String
See Also

Reference

ReflectionHelper Class
GetShortAssemblyName Overload
Duality Namespace


ReflectionHelper.GetTypeCSCodeName Method

ReflectionHelperGetTypeCSCodeName Method
Returns a string describing a certain Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetTypeCSCodeName(
    this Type type,
    bool shortName = false
)

Parameters

type
Type: SystemType
The Type to describe
shortName (Optional)
Type: SystemBoolean

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.GetTypeId Method

ReflectionHelperGetTypeId Method
Returns a string describing a certain Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetTypeId(
    this Type T
)

Parameters

T
Type: SystemType
The Type to describe

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.HasAttributeCached(T) Method

ReflectionHelperHasAttributeCachedT Method
Returns all custom attributes of the specified Type that are attached to the specified member. Inherites attributes are returned as well. This method is usually faster than comparable .Net methods, because it caches previous results internally.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HasAttributeCached<T>(
    this MemberInfo member
)
where T : Attribute

Parameters

member
Type: System.ReflectionMemberInfo

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MemberInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.IsPlainOldData Method

ReflectionHelperIsPlainOldData Method
Returns whether the specified type is a primitive, enum, string, decimal, or struct that consists only of those types.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsPlainOldData(
    this TypeInfo typeInfo
)

Parameters

typeInfo
Type: System.ReflectionTypeInfo

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TypeInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.ResolveMember Method

ReflectionHelperResolveMember Method
Resolves a Member based on its member id.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static MemberInfo ResolveMember(
    string memberString
)

Parameters

memberString
Type: SystemString
The member id of the member.

Return Value

Type: MemberInfo
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.ResolveType Method

ReflectionHelperResolveType Method
Resolves a Type based on its type id.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type ResolveType(
    string typeString,
    MethodInfo declaringMethod = null
)

Parameters

typeString
Type: SystemString
The type string to resolve.
declaringMethod (Optional)
Type: System.ReflectionMethodInfo
The generic method that is declaring the Type. Only necessary when resolving a generic methods parameter Type.

Return Value

Type: Type
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.SplitArgs Method

ReflectionHelperSplitArgs Method
Performs a selective split operation on the specified string. Intended to be used on hierarchial argument lists.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string[] SplitArgs(
    string argList,
    char pushLevel,
    char popLevel,
    char separator,
    int splitLevel
)

Parameters

argList
Type: SystemString
The argument list to split.
pushLevel
Type: SystemChar
The char that increases the current hierarchy level.
popLevel
Type: SystemChar
The char that decreases the current hierarchy level.
separator
Type: SystemChar
The char that separates two arguments.
splitLevel
Type: SystemInt32
The hierarchy level at which to perform the split operation.

Return Value

Type: String
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.VisitObjectsDeep(T) Method

ReflectionHelperVisitObjectsDeepT Method
Visits all fields of an object and all its sub-objects in order to find and / or adjust values of a certain Type. This is likely to be a very expensive operation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void VisitObjectsDeep<T>(
    Object obj,
    Func<T, T> visitor,
    bool stopAtTarget = true
)

Parameters

obj
Type: SystemObject
The root object where the search begins.
visitor
Type: SystemFunc T, T
An object field visitor. Returns a new value for the visited object.
stopAtTarget (Optional)
Type: SystemBoolean
If true, visited objects of the target type won't be investigated deeply. If false, even target objects are unwrapped in order to check their sub-objects.

Type Parameters

T
The value type that is searched for.
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper Events

ReflectionHelper Events

The ReflectionHelper type exposes the following members.

Events
Name | Description
MemberResolve | Fired when automatically resolving a certain Member has failed. Allows any subscriber to provide a suitable match.
TypeResolve | Fired when automatically resolving a certain Type has failed. Allows any subscriber to provide a suitable match.
Top
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.MemberResolve Event

ReflectionHelperMemberResolve Event
Fired when automatically resolving a certain Member has failed. Allows any subscriber to provide a suitable match.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResolveMemberEventArgs> MemberResolve

Value

Type: SystemEventHandler ResolveMemberEventArgs
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionHelper.TypeResolve Event

ReflectionHelperTypeResolve Event
Fired when automatically resolving a certain Type has failed. Allows any subscriber to provide a suitable match.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResolveMemberEventArgs> TypeResolve

Value

Type: SystemEventHandler ResolveMemberEventArgs
See Also

Reference

ReflectionHelper Class
Duality Namespace


ReflectionInfo Class

ReflectionInfo Class
Provides Reflection data on Properties and Fields.
Inheritance Hierarchy
SystemObject
DualityReflectionInfo

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ReflectionInfo

The ReflectionInfo type exposes the following members.

Fields
Name | Description
Field_Material_Info |
Property_BatchInfo_MainColor |
Property_BatchInfo_Technique |
Property_BatchInfo_Textures |
Property_BatchInfo_Uniforms |
Property_Camera_ClearColor |
Property_Camera_FocusDist |
Property_Component_ActiveSingle |
Property_Component_GameObj |
Property_DrawTechnique_PreferredVertexFormat |
Property_Font_Family |
Property_Font_GlyphRenderMode |
Property_Font_MonoSpace |
Property_Font_Size |
Property_Font_Style |
Property_GameObject_ActiveSingle |
Property_GameObject_Name |
Property_GameObject_Parent |
Property_GameObject_PrefabLink |
Property_Pixmap_AnimCols |
Property_Pixmap_AnimFrameBorder |
Property_Pixmap_AnimRows |
Property_Pixmap_Atlas |
Property_Resource_AssetInfo |
Property_RigidBody_Joints |
Property_RigidBody_Shapes |
Property_SoundEmitter_Sources |
Property_Transform_Angle |
Property_Transform_AngleVel |
Property_Transform_DeriveAngle |
Property_Transform_IgnoreParent |
Property_Transform_Pos |
Property_Transform_RelativeAngle |
Property_Transform_RelativeAngleVel |
Property_Transform_RelativePos |
Property_Transform_RelativeScale |
Property_Transform_RelativeVel |
Property_Transform_Scale |
Property_Transform_Vel |
Top
See Also

Reference

Duality Namespace


ReflectionInfo Fields

ReflectionInfo Fields

The ReflectionInfo type exposes the following members.

Fields
Name | Description
Field_Material_Info |
Property_BatchInfo_MainColor |
Property_BatchInfo_Technique |
Property_BatchInfo_Textures |
Property_BatchInfo_Uniforms |
Property_Camera_ClearColor |
Property_Camera_FocusDist |
Property_Component_ActiveSingle |
Property_Component_GameObj |
Property_DrawTechnique_PreferredVertexFormat |
Property_Font_Family |
Property_Font_GlyphRenderMode |
Property_Font_MonoSpace |
Property_Font_Size |
Property_Font_Style |
Property_GameObject_ActiveSingle |
Property_GameObject_Name |
Property_GameObject_Parent |
Property_GameObject_PrefabLink |
Property_Pixmap_AnimCols |
Property_Pixmap_AnimFrameBorder |
Property_Pixmap_AnimRows |
Property_Pixmap_Atlas |
Property_Resource_AssetInfo |
Property_RigidBody_Joints |
Property_RigidBody_Shapes |
Property_SoundEmitter_Sources |
Property_Transform_Angle |
Property_Transform_AngleVel |
Property_Transform_DeriveAngle |
Property_Transform_IgnoreParent |
Property_Transform_Pos |
Property_Transform_RelativeAngle |
Property_Transform_RelativeAngleVel |
Property_Transform_RelativePos |
Property_Transform_RelativeScale |
Property_Transform_RelativeVel |
Property_Transform_Scale |
Property_Transform_Vel |
Top
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Field_Material_Info Field

ReflectionInfoField_Material_Info Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly FieldInfo Field_Material_Info

Field Value

Type: FieldInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_BatchInfo_MainColor Field

ReflectionInfoProperty_BatchInfo_MainColor Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_BatchInfo_MainColor

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_BatchInfo_Technique Field

ReflectionInfoProperty_BatchInfo_Technique Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_BatchInfo_Technique

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_BatchInfo_Textures Field

ReflectionInfoProperty_BatchInfo_Textures Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_BatchInfo_Textures

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_BatchInfo_Uniforms Field

ReflectionInfoProperty_BatchInfo_Uniforms Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_BatchInfo_Uniforms

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Camera_ClearColor Field

ReflectionInfoProperty_Camera_ClearColor Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Camera_ClearColor

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Camera_FocusDist Field

ReflectionInfoProperty_Camera_FocusDist Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Camera_FocusDist

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Component_ActiveSingle Field

ReflectionInfoProperty_Component_ActiveSingle Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Component_ActiveSingle

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Component_GameObj Field

ReflectionInfoProperty_Component_GameObj Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Component_GameObj

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_DrawTechnique_PreferredVertexFormat Field

ReflectionInfoProperty_DrawTechnique_PreferredVertexFormat Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_DrawTechnique_PreferredVertexFormat

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Font_Family Field

ReflectionInfoProperty_Font_Family Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Font_Family

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Font_GlyphRenderMode Field

ReflectionInfoProperty_Font_GlyphRenderMode Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Font_GlyphRenderMode

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Font_MonoSpace Field

ReflectionInfoProperty_Font_MonoSpace Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Font_MonoSpace

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Font_Size Field

ReflectionInfoProperty_Font_Size Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Font_Size

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Font_Style Field

ReflectionInfoProperty_Font_Style Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Font_Style

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_GameObject_ActiveSingle Field

ReflectionInfoProperty_GameObject_ActiveSingle Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_GameObject_ActiveSingle

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_GameObject_Name Field

ReflectionInfoProperty_GameObject_Name Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_GameObject_Name

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_GameObject_Parent Field

ReflectionInfoProperty_GameObject_Parent Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_GameObject_Parent

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_GameObject_PrefabLink Field

ReflectionInfoProperty_GameObject_PrefabLink Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_GameObject_PrefabLink

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Pixmap_AnimCols Field

ReflectionInfoProperty_Pixmap_AnimCols Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Pixmap_AnimCols

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Pixmap_AnimFrameBorder Field

ReflectionInfoProperty_Pixmap_AnimFrameBorder Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Pixmap_AnimFrameBorder

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Pixmap_AnimRows Field

ReflectionInfoProperty_Pixmap_AnimRows Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Pixmap_AnimRows

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Pixmap_Atlas Field

ReflectionInfoProperty_Pixmap_Atlas Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Pixmap_Atlas

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Resource_AssetInfo Field

ReflectionInfoProperty_Resource_AssetInfo Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Resource_AssetInfo

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_RigidBody_Joints Field

ReflectionInfoProperty_RigidBody_Joints Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_RigidBody_Joints

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_RigidBody_Shapes Field

ReflectionInfoProperty_RigidBody_Shapes Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_RigidBody_Shapes

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_SoundEmitter_Sources Field

ReflectionInfoProperty_SoundEmitter_Sources Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_SoundEmitter_Sources

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_Angle Field

ReflectionInfoProperty_Transform_Angle Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_Angle

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_AngleVel Field

ReflectionInfoProperty_Transform_AngleVel Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_AngleVel

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_DeriveAngle Field

ReflectionInfoProperty_Transform_DeriveAngle Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_DeriveAngle

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_IgnoreParent Field

ReflectionInfoProperty_Transform_IgnoreParent Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_IgnoreParent

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_Pos Field

ReflectionInfoProperty_Transform_Pos Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_Pos

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_RelativeAngle Field

ReflectionInfoProperty_Transform_RelativeAngle Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_RelativeAngle

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_RelativeAngleVel Field

ReflectionInfoProperty_Transform_RelativeAngleVel Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_RelativeAngleVel

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_RelativePos Field

ReflectionInfoProperty_Transform_RelativePos Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_RelativePos

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_RelativeScale Field

ReflectionInfoProperty_Transform_RelativeScale Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_RelativeScale

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_RelativeVel Field

ReflectionInfoProperty_Transform_RelativeVel Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_RelativeVel

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_Scale Field

ReflectionInfoProperty_Transform_Scale Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_Scale

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


ReflectionInfo.Property_Transform_Vel Field

ReflectionInfoProperty_Transform_Vel Field

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly PropertyInfo Property_Transform_Vel

Field Value

Type: PropertyInfo
See Also

Reference

ReflectionInfo Class
Duality Namespace


RefreshMode Enumeration

RefreshMode Enumeration
Specifies intervals and modes to refresh the screen and update the game.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum RefreshMode
Members
Member name | Value | Description
NoSync | 0 | Refreshes occur as fast as possible with no wait inbetween.
ManualSync | 1 | Refreshes target 60 FPS and will use wait for each frame to use its entire available time. Doesn't use hardware / driver VSync, but prevents 100% CPU usage.
VSync | 2 | Refreshes wait for the hardware / driver VSync.
See Also

Reference

Duality Namespace


RequiredComponentAttribute Class

RequiredComponentAttribute Class
This attribute indicates a Components requirement for another Component of a specific Type, that is attached to the same GameObject.
Inheritance Hierarchy
SystemObject
SystemAttribute
DualityRequiredComponentAttribute

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RequiredComponentAttribute : Attribute

The RequiredComponentAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | RequiredComponentAttribute | Initializes a new instance of the RequiredComponentAttribute class
Top
Properties
 | Name | Description
Public property | RequiredComponentType | The Component Type that is required by this Component.
Top
Examples
The following code uses a RequiredComponentAttribute to indicate that a SoundEmitter always needs a Transform available as well.
Copy
1[RequiredComponent(typeof(Transform))]
2public sealed class SoundEmitter : Component, ICmpUpdatable, ICmpInitializable
3{
4    // ...
5}
See Also

Reference

Duality Namespace


RequiredComponentAttribute Constructor

RequiredComponentAttribute Constructor
Initializes a new instance of the RequiredComponentAttribute class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RequiredComponentAttribute(
    Type cmpType
)

Parameters

cmpType
Type: SystemType
See Also

Reference

RequiredComponentAttribute Class
Duality Namespace


RequiredComponentAttribute Properties

RequiredComponentAttribute Properties

The RequiredComponentAttribute type exposes the following members.

Properties
 | Name | Description
Public property | RequiredComponentType | The Component Type that is required by this Component.
Top
See Also

Reference

RequiredComponentAttribute Class
Duality Namespace


RequiredComponentAttribute.RequiredComponentType Property

RequiredComponentAttributeRequiredComponentType Property
The Component Type that is required by this Component.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type RequiredComponentType { get; }

Property Value

Type: Type
See Also

Reference

RequiredComponentAttribute Class
Duality Namespace


ResolveMemberEventArgs Class

ResolveMemberEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityResolveMemberEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResolveMemberEventArgs : EventArgs

The ResolveMemberEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | ResolveMemberEventArgs | Initializes a new instance of the ResolveMemberEventArgs class
Top
Properties
 | Name | Description
Public property | MemberId | [GET] The Member id to resolve.
Public property | ResolvedMember | [GET / SET] The resolved Member.
Top
See Also

Reference

Duality Namespace


ResolveMemberEventArgs Constructor

ResolveMemberEventArgs Constructor
Initializes a new instance of the ResolveMemberEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResolveMemberEventArgs(
    string memberId
)

Parameters

memberId
Type: SystemString
See Also

Reference

ResolveMemberEventArgs Class
Duality Namespace


ResolveMemberEventArgs Properties

ResolveMemberEventArgs Properties

The ResolveMemberEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | MemberId | [GET] The Member id to resolve.
Public property | ResolvedMember | [GET / SET] The resolved Member.
Top
See Also

Reference

ResolveMemberEventArgs Class
Duality Namespace


ResolveMemberEventArgs.MemberId Property

ResolveMemberEventArgsMemberId Property
[GET] The Member id to resolve.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string MemberId { get; }

Property Value

Type: String
See Also

Reference

ResolveMemberEventArgs Class
Duality Namespace


ResolveMemberEventArgs.ResolvedMember Property

ResolveMemberEventArgsResolvedMember Property
[GET / SET] The resolved Member.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MemberInfo ResolvedMember { get; set; }

Property Value

Type: MemberInfo
See Also

Reference

ResolveMemberEventArgs Class
Duality Namespace


Resource Class

Resource Class
The abstract Resource class is inherited by any kind of Duality content. Instances of it or one of its subclasses are usually handled wrapped inside a ContentRefT and requested from the ContentProvider.
Inheritance Hierarchy
SystemObject
DualityResource
More...

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class Resource : IManageableObject,
    IDisposable, ICloneExplicit

The Resource type exposes the following members.

Constructors
 | Name | Description
Protected method | Resource | Initializes a new instance of the Resource class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type.
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead!
 | DontSerializeResourceBlocker | A FieldBlocker to prevent fields flagged with a DontSerializeResourceAttribute from being serialized.
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource.
 | GetFileExtByType(Type) | Returns the Resource file extension for a specific Resource Type.
 | GetFileExtByTypeT | Returns the Resource file extension for a specific Resource Type.
 | GetResourceFiles | Returns all Resource files that are located in the specified directory. This doesn't affect any actual content- or load states.
 | GetTypeByFileName | Returns the Resource Type that is associated with the specified file, based on its extension.
 | Init | Initializes a Resource that has been loaded without initialization. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | IsResourceFile | Determines whether or not the specified path points to a Duality Resource file.
 | LoadT(String, ActionT, Boolean) | Loads the Resource that is located at the specified path. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | LoadT(Stream, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | LoadT(Serializer, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.
Protected method | OnDisposing | Called when beginning to dispose the Resource.
Protected method | OnLoaded | Called when this Resource has just been loaded.
Protected method | OnSaved | Called when this Resource has just been saved.
Protected method | OnSaving | Called when this Resource is now beginning to be saved.
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.
 | PrefabLinkedFieldBlocker | A FieldBlocker to prevent fields of PrefabLink-ed objects from being serialized unnecessarily.
Public method | Save(Stream) | Saves the Resource to the specified stream.
Public method | Save(String, Boolean) | Saves the Resource to the specified path.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor.
Protected field | path | The path of this Resource.
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the Resource.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider.
Top
Events
Name | Description
ResourceDisposing |
ResourceLoaded |
ResourceSaved |
ResourceSaving |
Top
See Also

Reference

Duality Namespace
DualityContentRefT
DualityContentProvider
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesAbstractShader
Duality.ResourcesAudioData
Duality.ResourcesDrawTechnique
Duality.ResourcesFont
Duality.ResourcesMaterial
Duality.ResourcesPixmap
Duality.ResourcesPrefab
Duality.ResourcesRenderTarget
Duality.ResourcesScene
Duality.ResourcesShaderProgram
Duality.ResourcesSound
Duality.ResourcesTexture


Resource Constructor

Resource Constructor
Initializes a new instance of the Resource class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Resource()
See Also

Reference

Resource Class
Duality Namespace


Resource Fields

Resource Fields

The Resource type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor.
Protected field | path | The path of this Resource.
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.assetInfo Field

ResourceassetInfo Field
Contains information on how this Resource should be treated during Asset import operations in the editor.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected AssetInfo assetInfo

Field Value

Type: AssetInfo
See Also

Reference

Resource Class
Duality Namespace


Resource.path Field

Resourcepath Field
The path of this Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected string path

Field Value

Type: String
See Also

Reference

Resource Class
Duality Namespace


Resource Methods

Resource Methods

The Resource type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type.
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead!
 | DontSerializeResourceBlocker | A FieldBlocker to prevent fields flagged with a DontSerializeResourceAttribute from being serialized.
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource.
 | GetFileExtByType(Type) | Returns the Resource file extension for a specific Resource Type.
 | GetFileExtByTypeT | Returns the Resource file extension for a specific Resource Type.
 | GetResourceFiles | Returns all Resource files that are located in the specified directory. This doesn't affect any actual content- or load states.
 | GetTypeByFileName | Returns the Resource Type that is associated with the specified file, based on its extension.
 | Init | Initializes a Resource that has been loaded without initialization. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | IsResourceFile | Determines whether or not the specified path points to a Duality Resource file.
 | LoadT(String, ActionT, Boolean) | Loads the Resource that is located at the specified path. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | LoadT(Stream, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
 | LoadT(Serializer, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.
Protected method | OnDisposing | Called when beginning to dispose the Resource.
Protected method | OnLoaded | Called when this Resource has just been loaded.
Protected method | OnSaved | Called when this Resource has just been saved.
Protected method | OnSaving | Called when this Resource is now beginning to be saved.
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.
 | PrefabLinkedFieldBlocker | A FieldBlocker to prevent fields of PrefabLink-ed objects from being serialized unnecessarily.
Public method | Save(Stream) | Saves the Resource to the specified stream.
Public method | Save(String, Boolean) | Saves the Resource to the specified path.
Public method | ToString | (Overrides ObjectToString.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DisposeLater | Schedules this object for disposal at the end of the current update cycle. (Defined by ExtMethodsIManageableObject.)
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.Clone Method

ResourceClone Method
Creates a deep copy of this Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Resource Clone()

Return Value

Type: Resource
See Also

Reference

Resource Class
Duality Namespace


Resource.CopyTo Method

ResourceCopyTo Method
Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    Resource target
)

Parameters

target
Type: DualityResource
The target Resource to copy this Resource's data to
See Also

Reference

Resource Class
Duality Namespace


Resource.Dispose Method

ResourceDispose Method
Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead!

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IManageableObjectDispose
IDisposableDispose
See Also

Reference

Resource Class
Duality Namespace


Resource.DontSerializeResourceBlocker Method

ResourceDontSerializeResourceBlocker Method
A FieldBlocker to prevent fields flagged with a DontSerializeResourceAttribute from being serialized.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool DontSerializeResourceBlocker(
    FieldInfo field,
    Object obj
)

Parameters

field
Type: System.ReflectionFieldInfo
obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

Resource Class
Duality Namespace


Resource.Finalize Method

ResourceFinalize Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

Resource Class
Duality Namespace


Resource.GetContentRef Method

ResourceGetContentRef Method
Creates a ContentRefT referring to this Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IContentRef GetContentRef()

Return Value

Type: IContentRef
A ContentRefT referring to this Resource.
See Also

Reference

Resource Class
Duality Namespace


Resource.GetFileExtByType Method

ResourceGetFileExtByType Method
Overload List
Name | Description
GetFileExtByTypeT | Returns the Resource file extension for a specific Resource Type.
GetFileExtByType(Type) | Returns the Resource file extension for a specific Resource Type.
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.GetFileExtByType(T) Method

ResourceGetFileExtByTypeT Method
Returns the Resource file extension for a specific Resource Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFileExtByType<T>()
where T : Resource

Type Parameters

T

Return Value

Type: String
The specified Resource Type's file extension.
See Also

Reference

Resource Class
GetFileExtByType Overload
Duality Namespace


Resource.GetFileExtByType Method (Type)

ResourceGetFileExtByType Method (Type)
Returns the Resource file extension for a specific Resource Type.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFileExtByType(
    Type resType
)

Parameters

resType
Type: SystemType
The Resource Type to return the file extension from.

Return Value

Type: String
The specified Resource Type's file extension.
See Also

Reference

Resource Class
GetFileExtByType Overload
Duality Namespace


Resource.GetResourceFiles Method

ResourceGetResourceFiles Method
Returns all Resource files that are located in the specified directory. This doesn't affect any actual content- or load states.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<string> GetResourceFiles(
    string folderPath = null
)

Parameters

folderPath (Optional)
Type: SystemString

Return Value

Type: IEnumerable String
See Also

Reference

Resource Class
Duality Namespace


Resource.GetTypeByFileName Method

ResourceGetTypeByFileName Method
Returns the Resource Type that is associated with the specified file, based on its extension.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type GetTypeByFileName(
    string filePath
)

Parameters

filePath
Type: SystemString
Path to the file of whichs Resource Type will be returned

Return Value

Type: Type
The Resource Type of the specified file
See Also

Reference

Resource Class
Duality Namespace


Resource.Init Method

ResourceInit Method
Initializes a Resource that has been loaded without initialization. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Init(
    Resource res
)

Parameters

res
Type: DualityResource
The Resource to initialize.
See Also

Reference

Resource Class
Duality Namespace


Resource.IsResourceFile Method

ResourceIsResourceFile Method
Determines whether or not the specified path points to a Duality Resource file.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsResourceFile(
    string filePath
)

Parameters

filePath
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

Resource Class
Duality Namespace


Resource.Load Method

ResourceLoad Method
Overload List
Name | Description
LoadT(String, ActionT, Boolean) | Loads the Resource that is located at the specified path. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
LoadT(Stream, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
LoadT(Serializer, String, ActionT, Boolean) | Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.Load(T) Method (String, Action(T), Boolean)

ResourceLoadT Method (String, ActionT, Boolean)
Loads the Resource that is located at the specified path. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Load<T>(
    string path,
    Action<T> loadCallback = null,
    bool initResource = true
)
where T : Resource

Parameters

path
Type: SystemString
The path to load the Resource from.
loadCallback (Optional)
Type: SystemAction T
An optional callback that is invoked right after loading the Resource, but before initializing it.
initResource (Optional)
Type: SystemBoolean
Specifies whether or not the Resource is initialized by calling OnLoaded. Never attempt to use uninitialized Resources or register them in the ContentProvider.

Type Parameters

T
Desired Type of the returned reference. Does not affect the loaded Resource in any way - it is simply returned as T. Results in returning null if the loaded Resource's Type isn't assignable to T.

Return Value

Type: T
The Resource that has been loaded.
See Also

Reference

Resource Class
Load Overload
Duality Namespace


Resource.Load(T) Method (Stream, String, Action(T), Boolean)

ResourceLoadT Method (Stream, String, ActionT, Boolean)
Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Load<T>(
    Stream str,
    string resPath = null,
    Action<T> loadCallback = null,
    bool initResource = true
)
where T : Resource

Parameters

str
Type: System.IOStream
The stream to load the Resource from.
resPath (Optional)
Type: SystemString
The path that is assumed as the loaded Resource's origin.
loadCallback (Optional)
Type: SystemAction T
An optional callback that is invoked right after loading the Resource, but before initializing it.
initResource (Optional)
Type: SystemBoolean
Specifies whether or not the Resource is initialized by calling OnLoaded. Never attempt to use uninitialized Resources or register them in the ContentProvider.

Type Parameters

T
Desired Type of the returned reference. Does not affect the loaded Resource in any way - it is simply returned as T. Results in returning null if the loaded Resource's Type isn't assignable to T.

Return Value

Type: T
The Resource that has been loaded.
See Also

Reference

Resource Class
Load Overload
Duality Namespace


Resource.Load(T) Method (Serializer, String, Action(T), Boolean)

ResourceLoadT Method (Serializer, String, ActionT, Boolean)
Loads the Resource from the specified Stream. You shouldn't need this method in almost all cases. Only use it when you know exactly what you're doing. Consider requesting the Resource from the ContentProvider instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Load<T>(
    Serializer formatter,
    string resPath = null,
    Action<T> loadCallback = null,
    bool initResource = true
)
where T : Resource

Parameters

formatter
Type: Duality.SerializationSerializer
resPath (Optional)
Type: SystemString
The path that is assumed as the loaded Resource's origin.
loadCallback (Optional)
Type: SystemAction T
An optional callback that is invoked right after loading the Resource, but before initializing it.
initResource (Optional)
Type: SystemBoolean
Specifies whether or not the Resource is initialized by calling OnLoaded. Never attempt to use uninitialized Resources or register them in the ContentProvider.

Type Parameters

T
Desired Type of the returned reference. Does not affect the loaded Resource in any way - it is simply returned as T. Results in returning null if the loaded Resource's Type isn't assignable to T.

Return Value

Type: T
The Resource that has been loaded.
See Also

Reference

Resource Class
Load Overload
Duality Namespace


Resource.OnCopyDataTo Method

ResourceOnCopyDataTo Method
This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
The target Resource where this Resources data is copied to.
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Resource Class
Duality Namespace


Resource.OnDisposing Method

ResourceOnDisposing Method
Called when beginning to dispose the Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Resource Class
Duality Namespace


Resource.OnLoaded Method

ResourceOnLoaded Method
Called when this Resource has just been loaded.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnLoaded()
See Also

Reference

Resource Class
Duality Namespace


Resource.OnSaved Method

ResourceOnSaved Method
Called when this Resource has just been saved.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnSaved(
    string saveAsPath
)

Parameters

saveAsPath
Type: SystemString
See Also

Reference

Resource Class
Duality Namespace


Resource.OnSaving Method

ResourceOnSaving Method
Called when this Resource is now beginning to be saved.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnSaving(
    string saveAsPath
)

Parameters

saveAsPath
Type: SystemString
See Also

Reference

Resource Class
Duality Namespace


Resource.OnSetupCloneTargets Method

ResourceOnSetupCloneTargets Method
This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnSetupCloneTargets(
    Object target,
    ICloneTargetSetup setup
)

Parameters

target
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

Resource Class
Duality Namespace


Resource.PrefabLinkedFieldBlocker Method

ResourcePrefabLinkedFieldBlocker Method
A FieldBlocker to prevent fields of PrefabLink-ed objects from being serialized unnecessarily.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool PrefabLinkedFieldBlocker(
    FieldInfo field,
    Object obj
)

Parameters

field
Type: System.ReflectionFieldInfo
obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

Resource Class
Duality Namespace


Resource.Save Method

ResourceSave Method
Overload List
 | Name | Description
Public method | Save(Stream) | Saves the Resource to the specified stream.
Public method | Save(String, Boolean) | Saves the Resource to the specified path.
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.Save Method (Stream)

ResourceSave Method (Stream)
Saves the Resource to the specified stream.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Save(
    Stream str
)

Parameters

str
Type: System.IOStream
See Also

Reference

Resource Class
Save Overload
Duality Namespace


Resource.Save Method (String, Boolean)

ResourceSave Method (String, Boolean)
Saves the Resource to the specified path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Save(
    string saveAsPath = null,
    bool makePermanent = true
)

Parameters

saveAsPath (Optional)
Type: SystemString
The path to which this Resource is saved to. If null, the Resources Path is used as destination.
makePermanent (Optional)
Type: SystemBoolean
When true, the Resource will be made permanently available from now on. If it has been generated at runtime or was loaded explicitly outside the ContentProvider, this will set the Resources Path Property and register it in the ContentProvider. If the Resource already is a permanent, this parameter will be ignored.
See Also

Reference

Resource Class
Save Overload
Duality Namespace


Resource.ToString Method

ResourceToString Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Resource Class
Duality Namespace


Resource Properties

Resource Properties

The Resource type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.
Public property | Name | [GET] The name of the Resource.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider.
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.AssetInfo Property

ResourceAssetInfo Property
[GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AssetInfo AssetInfo { get; set; }

Property Value

Type: AssetInfo
See Also

Reference

Resource Class
Duality Namespace


Resource.Disposed Property

ResourceDisposed Property
[GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean

Implements

IManageableObjectDisposed
See Also

Reference

Resource Class
Duality Namespace


Resource.FullName Property

ResourceFullName Property
[GET] The full name of the Resource, including its path but not its file extension

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FullName { get; }

Property Value

Type: String
See Also

Reference

Resource Class
Duality Namespace


Resource.IsDefaultContent Property

ResourceIsDefaultContent Property
[GET] Returns whether the Resource is part of Duality's embedded default content.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsDefaultContent { get; }

Property Value

Type: Boolean
See Also

Reference

Resource Class
Duality Namespace


Resource.IsRuntimeResource Property

ResourceIsRuntimeResource Property
[GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsRuntimeResource { get; }

Property Value

Type: Boolean
See Also

Reference

Resource Class
Duality Namespace


Resource.Name Property

ResourceName Property
[GET] The name of the Resource.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String
See Also

Reference

Resource Class
Duality Namespace


Resource.Path Property

ResourcePath Property
[GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Path { get; }

Property Value

Type: String
See Also

Reference

Resource Class
Duality Namespace


Resource Events

Resource Events

The Resource type exposes the following members.

Events
Name | Description
ResourceDisposing |
ResourceLoaded |
ResourceSaved |
ResourceSaving |
Top
See Also

Reference

Resource Class
Duality Namespace


Resource.ResourceDisposing Event

ResourceResourceDisposing Event

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResourceEventArgs> ResourceDisposing

Value

Type: SystemEventHandler ResourceEventArgs
See Also

Reference

Resource Class
Duality Namespace


Resource.ResourceLoaded Event

ResourceResourceLoaded Event

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResourceEventArgs> ResourceLoaded

Value

Type: SystemEventHandler ResourceEventArgs
See Also

Reference

Resource Class
Duality Namespace


Resource.ResourceSaved Event

ResourceResourceSaved Event

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResourceSaveEventArgs> ResourceSaved

Value

Type: SystemEventHandler ResourceSaveEventArgs
See Also

Reference

Resource Class
Duality Namespace


Resource.ResourceSaving Event

ResourceResourceSaving Event

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ResourceSaveEventArgs> ResourceSaving

Value

Type: SystemEventHandler ResourceSaveEventArgs
See Also

Reference

Resource Class
Duality Namespace


ResourceEventArgs Class

ResourceEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityResourceEventArgs
DualityResourceSaveEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResourceEventArgs : EventArgs

The ResourceEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | ResourceEventArgs(String, Boolean) | Initializes a new instance of the ResourceEventArgs class
Public method | ResourceEventArgs(ContentRefResource, Boolean) | Initializes a new instance of the ResourceEventArgs class
Top
Properties
 | Name | Description
Public property | Content |
Public property | ContentType |
Public property | IsDefaultContent |
Public property | IsDirectory |
Public property | IsResource |
Public property | Path |
Top
See Also

Reference

Duality Namespace


ResourceEventArgs Constructor

ResourceEventArgs Constructor
Overload List
 | Name | Description
Public method | ResourceEventArgs(String, Boolean) | Initializes a new instance of the ResourceEventArgs class
Public method | ResourceEventArgs(ContentRefResource, Boolean) | Initializes a new instance of the ResourceEventArgs class
Top
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs Constructor (String, Boolean)

ResourceEventArgs Constructor (String, Boolean)
Initializes a new instance of the ResourceEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceEventArgs(
    string path,
    bool isDirectory
)

Parameters

path
Type: SystemString
isDirectory
Type: SystemBoolean
See Also

Reference

ResourceEventArgs Class
ResourceEventArgs Overload
Duality Namespace


ResourceEventArgs Constructor (ContentRef(Resource), Boolean)

ResourceEventArgs Constructor (ContentRefResource, Boolean)
Initializes a new instance of the ResourceEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceEventArgs(
    ContentRef<Resource> resRef,
    bool isDirectory = false
)

Parameters

resRef
Type: DualityContentRef Resource
isDirectory (Optional)
Type: SystemBoolean
See Also

Reference

ResourceEventArgs Class
ResourceEventArgs Overload
Duality Namespace


ResourceEventArgs Properties

ResourceEventArgs Properties

The ResourceEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Content |
Public property | ContentType |
Public property | IsDefaultContent |
Public property | IsDirectory |
Public property | IsResource |
Public property | Path |
Top
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.Content Property

ResourceEventArgsContent Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Resource> Content { get; }

Property Value

Type: ContentRef Resource
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.ContentType Property

ResourceEventArgsContentType Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type ContentType { get; }

Property Value

Type: Type
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.IsDefaultContent Property

ResourceEventArgsIsDefaultContent Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsDefaultContent { get; }

Property Value

Type: Boolean
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.IsDirectory Property

ResourceEventArgsIsDirectory Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsDirectory { get; }

Property Value

Type: Boolean
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.IsResource Property

ResourceEventArgsIsResource Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsResource { get; }

Property Value

Type: Boolean
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceEventArgs.Path Property

ResourceEventArgsPath Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Path { get; }

Property Value

Type: String
See Also

Reference

ResourceEventArgs Class
Duality Namespace


ResourceResolveEventArgs Class

ResourceResolveEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityResourceResolveEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResourceResolveEventArgs : EventArgs

The ResourceResolveEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | ResourceResolveEventArgs | Initializes a new instance of the ResourceResolveEventArgs class
Top
Methods
 | Name | Description
Public method | Resolve |
Top
Properties
 | Name | Description
Public property | Handled |
Public property | RequestedContent |
Public property | Result |
Top
See Also

Reference

Duality Namespace


ResourceResolveEventArgs Constructor

ResourceResolveEventArgs Constructor
Initializes a new instance of the ResourceResolveEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceResolveEventArgs(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs Methods

ResourceResolveEventArgs Methods

The ResourceResolveEventArgs type exposes the following members.

Methods
 | Name | Description
Public method | Resolve |
Top
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs.Resolve Method

ResourceResolveEventArgsResolve Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Resolve(
    Resource result
)

Parameters

result
Type: DualityResource
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs Properties

ResourceResolveEventArgs Properties

The ResourceResolveEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Handled |
Public property | RequestedContent |
Public property | Result |
Top
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs.Handled Property

ResourceResolveEventArgsHandled Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Handled { get; }

Property Value

Type: Boolean
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs.RequestedContent Property

ResourceResolveEventArgsRequestedContent Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string RequestedContent { get; }

Property Value

Type: String
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceResolveEventArgs.Result Property

ResourceResolveEventArgsResult Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Resource Result { get; }

Property Value

Type: Resource
See Also

Reference

ResourceResolveEventArgs Class
Duality Namespace


ResourceSaveEventArgs Class

ResourceSaveEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityResourceEventArgs
DualityResourceSaveEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResourceSaveEventArgs : ResourceEventArgs

The ResourceSaveEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | ResourceSaveEventArgs(String, String) | Initializes a new instance of the ResourceSaveEventArgs class
Public method | ResourceSaveEventArgs(ContentRefResource, String) | Initializes a new instance of the ResourceSaveEventArgs class
Public method | ResourceSaveEventArgs(IContentRef, String) | Initializes a new instance of the ResourceSaveEventArgs class
Top
Properties
 | Name | Description
Public property | Content | (Inherited from ResourceEventArgs.)
Public property | ContentType | (Inherited from ResourceEventArgs.)
Public property | IsDefaultContent | (Inherited from ResourceEventArgs.)
Public property | IsDirectory | (Inherited from ResourceEventArgs.)
Public property | IsResource | (Inherited from ResourceEventArgs.)
Public property | Path | (Inherited from ResourceEventArgs.)
Public property | SaveAsPath |
Top
See Also

Reference

Duality Namespace


ResourceSaveEventArgs Constructor

ResourceSaveEventArgs Constructor
Overload List
 | Name | Description
Public method | ResourceSaveEventArgs(String, String) | Initializes a new instance of the ResourceSaveEventArgs class
Public method | ResourceSaveEventArgs(ContentRefResource, String) | Initializes a new instance of the ResourceSaveEventArgs class
Public method | ResourceSaveEventArgs(IContentRef, String) | Initializes a new instance of the ResourceSaveEventArgs class
Top
See Also

Reference

ResourceSaveEventArgs Class
Duality Namespace


ResourceSaveEventArgs Constructor (String, String)

ResourceSaveEventArgs Constructor (String, String)
Initializes a new instance of the ResourceSaveEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceSaveEventArgs(
    string path,
    string saveAsPath
)

Parameters

path
Type: SystemString
saveAsPath
Type: SystemString
See Also

Reference

ResourceSaveEventArgs Class
ResourceSaveEventArgs Overload
Duality Namespace


ResourceSaveEventArgs Constructor (ContentRef(Resource), String)

ResourceSaveEventArgs Constructor (ContentRefResource, String)
Initializes a new instance of the ResourceSaveEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceSaveEventArgs(
    ContentRef<Resource> resRef,
    string saveAsPath
)

Parameters

resRef
Type: DualityContentRef Resource
saveAsPath
Type: SystemString
See Also

Reference

ResourceSaveEventArgs Class
ResourceSaveEventArgs Overload
Duality Namespace


ResourceSaveEventArgs Constructor (IContentRef, String)

ResourceSaveEventArgs Constructor (IContentRef, String)
Initializes a new instance of the ResourceSaveEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResourceSaveEventArgs(
    IContentRef resRef,
    string saveAsPath
)

Parameters

resRef
Type: DualityIContentRef
saveAsPath
Type: SystemString
See Also

Reference

ResourceSaveEventArgs Class
ResourceSaveEventArgs Overload
Duality Namespace


ResourceSaveEventArgs Properties

ResourceSaveEventArgs Properties

The ResourceSaveEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Content | (Inherited from ResourceEventArgs.)
Public property | ContentType | (Inherited from ResourceEventArgs.)
Public property | IsDefaultContent | (Inherited from ResourceEventArgs.)
Public property | IsDirectory | (Inherited from ResourceEventArgs.)
Public property | IsResource | (Inherited from ResourceEventArgs.)
Public property | Path | (Inherited from ResourceEventArgs.)
Public property | SaveAsPath |
Top
See Also

Reference

ResourceSaveEventArgs Class
Duality Namespace


ResourceSaveEventArgs.SaveAsPath Property

ResourceSaveEventArgsSaveAsPath Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string SaveAsPath { get; }

Property Value

Type: String
See Also

Reference

ResourceSaveEventArgs Class
Duality Namespace


ScreenMode Enumeration

ScreenMode Enumeration
Describes the way a Duality window is set up.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ScreenMode
Members
Member name | Value | Description
Window | 0 | Duality runs in windowed mode. The window can be resized by the user.
FixedWindow | 1 | Duality runs in windowed mode. The window has a fixed size.
FullWindow | 2 | Duality runs in windowed mode. The window is borderless and covers the whole screen.
Native | 3 | Duality runs in fullscreen mode, using whatever screen resolution is currently active on the users desktop.
Fullscreen | 4 | Duality runs in fullscreen mode and changes desktop resolution whenever necesary.
See Also

Reference

Duality Namespace


StatCounter Class

StatCounter Class
Inheritance Hierarchy
SystemObject
DualityProfileCounter
DualityStatCounter

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class StatCounter : ProfileCounter

The StatCounter type exposes the following members.

Constructors
 | Name | Description
Public method | StatCounter | Initializes a new instance of the StatCounter class
Top
Methods
 | Name | Description
Public method | Add |
Public method | GetReportData | (Overrides ProfileCounterGetReportData(ProfileReportCounterData, ProfileReportOptions).)
Protected method | OnFrameTick | (Overrides ProfileCounterOnFrameTick.)
Public method | Reset | (Overrides ProfileCounterReset.)
Public method | Set |
Top
Fields
 | Name | Description
Protected field | lastUsed | (Inherited from ProfileCounter.)
Protected field | sampleCount | (Inherited from ProfileCounter.)
Protected field | used | (Inherited from ProfileCounter.)
Top
Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display. (Inherited from ProfileCounter.)
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters. (Inherited from ProfileCounter.)
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet. (Inherited from ProfileCounter.)
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing. (Inherited from ProfileCounter.)
Public property | LastValue |
Public property | MaxValue |
Public property | MinValue |
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included. (Inherited from ProfileCounter.)
Public property | Parent | [GET] This counters parent counter. (Inherited from ProfileCounter.)
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry. (Inherited from ProfileCounter.)
Public property | ValueGraph |
Public property | ValueGraphCursor |
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame. (Inherited from ProfileCounter.)
Top
See Also

Reference

Duality Namespace


StatCounter Constructor

StatCounter Constructor
Initializes a new instance of the StatCounter class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public StatCounter()
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter Fields

StatCounter Fields

The StatCounter type exposes the following members.

Fields
 | Name | Description
Protected field | lastUsed | (Inherited from ProfileCounter.)
Protected field | sampleCount | (Inherited from ProfileCounter.)
Protected field | used | (Inherited from ProfileCounter.)
Top
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter Methods

StatCounter Methods

The StatCounter type exposes the following members.

Methods
 | Name | Description
Public method | Add |
Public method | GetReportData | (Overrides ProfileCounterGetReportData(ProfileReportCounterData, ProfileReportOptions).)
Protected method | OnFrameTick | (Overrides ProfileCounterOnFrameTick.)
Public method | Reset | (Overrides ProfileCounterReset.)
Public method | Set |
Top
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.Add Method

StatCounterAdd Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Add(
    int value
)

Parameters

value
Type: SystemInt32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.GetReportData Method

StatCounterGetReportData Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void GetReportData(
    out ProfileReportCounterData data,
    ProfileReportOptions options
)

Parameters

data
Type: DualityProfileReportCounterData
options
Type: DualityProfileReportOptions
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.OnFrameTick Method

StatCounterOnFrameTick Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnFrameTick()
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.Reset Method

StatCounterReset Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Reset()
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.Set Method

StatCounterSet Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Set(
    int value
)

Parameters

value
Type: SystemInt32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter Properties

StatCounter Properties

The StatCounter type exposes the following members.

Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display. (Inherited from ProfileCounter.)
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters. (Inherited from ProfileCounter.)
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet. (Inherited from ProfileCounter.)
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing. (Inherited from ProfileCounter.)
Public property | LastValue |
Public property | MaxValue |
Public property | MinValue |
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included. (Inherited from ProfileCounter.)
Public property | Parent | [GET] This counters parent counter. (Inherited from ProfileCounter.)
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry. (Inherited from ProfileCounter.)
Public property | ValueGraph |
Public property | ValueGraphCursor |
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame. (Inherited from ProfileCounter.)
Top
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.LastValue Property

StatCounterLastValue Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int LastValue { get; }

Property Value

Type: Int32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.MaxValue Property

StatCounterMaxValue Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MaxValue { get; }

Property Value

Type: Int32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.MinValue Property

StatCounterMinValue Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MinValue { get; }

Property Value

Type: Int32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.ValueGraph Property

StatCounterValueGraph Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] ValueGraph { get; }

Property Value

Type: Int32
See Also

Reference

StatCounter Class
Duality Namespace


StatCounter.ValueGraphCursor Property

StatCounterValueGraphCursor Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ValueGraphCursor { get; }

Property Value

Type: Int32
See Also

Reference

StatCounter Class
Duality Namespace


TextWriterLogOutput Class

TextWriterLogOutput Class
A Log output that uses a TextWriter as message destination.
Inheritance Hierarchy
SystemObject
DualityTextWriterLogOutput

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TextWriterLogOutput : ILogOutput

The TextWriterLogOutput type exposes the following members.

Constructors
 | Name | Description
Public method | TextWriterLogOutput | Initializes a new instance of the TextWriterLogOutput class
Top
Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Protected method | WriteLine | Writes a single line of the final, formatted text message to the output.
Top
Properties
 | Name | Description
Public property | Target |
Top
See Also

Reference

Duality Namespace


TextWriterLogOutput Constructor

TextWriterLogOutput Constructor
Initializes a new instance of the TextWriterLogOutput class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextWriterLogOutput(
    TextWriter target
)

Parameters

target
Type: System.IOTextWriter
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


TextWriterLogOutput Methods

TextWriterLogOutput Methods

The TextWriterLogOutput type exposes the following members.

Methods
 | Name | Description
Public method | Write | Writes a single message to the output.
Protected method | WriteLine | Writes a single line of the final, formatted text message to the output.
Top
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


TextWriterLogOutput.Write Method

TextWriterLogOutputWrite Method
Writes a single message to the output.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void Write(
    LogEntry entry
)

Parameters

entry
Type: DualityLogEntry
The new log entry that is to be written to the output.

Implements

ILogOutputWrite(LogEntry)
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


TextWriterLogOutput.WriteLine Method

TextWriterLogOutputWriteLine Method
Writes a single line of the final, formatted text message to the output.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void WriteLine(
    Log source,
    LogMessageType type,
    string formattedLine,
    Object context
)

Parameters

source
Type: DualityLog
type
Type: DualityLogMessageType
formattedLine
Type: SystemString
context
Type: SystemObject
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


TextWriterLogOutput Properties

TextWriterLogOutput Properties

The TextWriterLogOutput type exposes the following members.

Properties
 | Name | Description
Public property | Target |
Top
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


TextWriterLogOutput.Target Property

TextWriterLogOutputTarget Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextWriter Target { get; }

Property Value

Type: TextWriter
See Also

Reference

TextWriterLogOutput Class
Duality Namespace


Time Class

Time Class
The Time class provides a global interface for time measurement and control. It affects all time-dependent computations. Use the TimeMult Property to make your own computations time-dependent instead of frame-dependent. Otherwise, your game logic will depend on how many FPS the player's machine achieves and mit behave differently on very slow or fast machines.
Inheritance Hierarchy
SystemObject
DualityTime

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class Time

The Time type exposes the following members.

Methods
Name | Description
Freeze | Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.
Resume | Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.
Top
Fields
Name | Description
FPSMult | The amount of frame per second at the desired refresh rate of 60 FPS.
MsPFMult | Milliseconds a frame takes at the desired refresh rate of 60 FPS
SPFMult | Seconds a frame takes at the desired refresh rate of 60 FPS
Top
Properties
Name | Description
Fps | [GET] Frames per Second
FrameCount | [GET] The number of frames passed since startup
GameTimer | [GET] Returns the game time that has passed since engine startup. Since it's game time, this timer will stop when pausing or freezing and also run slower or faster according to TimeScale.
LastDelta | [GET] Time in milliseconds the last frame took. Do not use this for frame-independent calculations. Use TimeMult instead.
MainTimer | [GET] Returns the real time that has passed since engine startup.
StartupTime | [GET] Returns the date and time of engine startup.
TimeMult | [GET] Multiply any frame-independend movement or change with this factor. It also applies the time scale you set.
TimeScale | [GET / SET] Specifies how fast game time runs compared to real time i.e. how fast the game runs. May be used for slow motion effects.
Top
See Also

Reference

Duality Namespace


Time Fields

Time Fields

The Time type exposes the following members.

Fields
Name | Description
FPSMult | The amount of frame per second at the desired refresh rate of 60 FPS.
MsPFMult | Milliseconds a frame takes at the desired refresh rate of 60 FPS
SPFMult | Seconds a frame takes at the desired refresh rate of 60 FPS
Top
See Also

Reference

Time Class
Duality Namespace


Time.FPSMult Field

TimeFPSMult Field
The amount of frame per second at the desired refresh rate of 60 FPS.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float FPSMult

Field Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time.MsPFMult Field

TimeMsPFMult Field
Milliseconds a frame takes at the desired refresh rate of 60 FPS

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float MsPFMult

Field Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time.SPFMult Field

TimeSPFMult Field
Seconds a frame takes at the desired refresh rate of 60 FPS

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float SPFMult

Field Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time Methods

Time Methods

The Time type exposes the following members.

Methods
Name | Description
Freeze | Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.
Resume | Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.
Top
See Also

Reference

Time Class
Duality Namespace


Time.Freeze Method

TimeFreeze Method
Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Freeze()
See Also

Reference

Time Class
Duality Namespace


Time.Resume Method

TimeResume Method
Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Resume()
See Also

Reference

Time Class
Duality Namespace


Time Properties

Time Properties

The Time type exposes the following members.

Properties
Name | Description
Fps | [GET] Frames per Second
FrameCount | [GET] The number of frames passed since startup
GameTimer | [GET] Returns the game time that has passed since engine startup. Since it's game time, this timer will stop when pausing or freezing and also run slower or faster according to TimeScale.
LastDelta | [GET] Time in milliseconds the last frame took. Do not use this for frame-independent calculations. Use TimeMult instead.
MainTimer | [GET] Returns the real time that has passed since engine startup.
StartupTime | [GET] Returns the date and time of engine startup.
TimeMult | [GET] Multiply any frame-independend movement or change with this factor. It also applies the time scale you set.
TimeScale | [GET / SET] Specifies how fast game time runs compared to real time i.e. how fast the game runs. May be used for slow motion effects.
Top
See Also

Reference

Time Class
Duality Namespace


Time.Fps Property

TimeFps Property
[GET] Frames per Second

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float Fps { get; }

Property Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time.FrameCount Property

TimeFrameCount Property
[GET] The number of frames passed since startup

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int FrameCount { get; }

Property Value

Type: Int32
See Also

Reference

Time Class
Duality Namespace


Time.GameTimer Property

TimeGameTimer Property
[GET] Returns the game time that has passed since engine startup. Since it's game time, this timer will stop when pausing or freezing and also run slower or faster according to TimeScale.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static TimeSpan GameTimer { get; }

Property Value

Type: TimeSpan
See Also

Reference

Time Class
Duality Namespace


Time.LastDelta Property

TimeLastDelta Property
[GET] Time in milliseconds the last frame took. Do not use this for frame-independent calculations. Use TimeMult instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float LastDelta { get; }

Property Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time.MainTimer Property

TimeMainTimer Property
[GET] Returns the real time that has passed since engine startup.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static TimeSpan MainTimer { get; }

Property Value

Type: TimeSpan
See Also

Reference

Time Class
Duality Namespace


Time.StartupTime Property

TimeStartupTime Property
[GET] Returns the date and time of engine startup.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static DateTime StartupTime { get; }

Property Value

Type: DateTime
See Also

Reference

Time Class
Duality Namespace


Time.TimeMult Property

TimeTimeMult Property
[GET] Multiply any frame-independend movement or change with this factor. It also applies the time scale you set.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float TimeMult { get; }

Property Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


Time.TimeScale Property

TimeTimeScale Property
[GET / SET] Specifies how fast game time runs compared to real time i.e. how fast the game runs. May be used for slow motion effects.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float TimeScale { get; set; }

Property Value

Type: Single
See Also

Reference

Time Class
Duality Namespace


TimeCounter Class

TimeCounter Class
Inheritance Hierarchy
SystemObject
DualityProfileCounter
DualityTimeCounter

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TimeCounter : ProfileCounter

The TimeCounter type exposes the following members.

Constructors
 | Name | Description
Public method | TimeCounter | Initializes a new instance of the TimeCounter class
Top
Methods
 | Name | Description
Public method | Add |
Public method | BeginMeasure |
Public method | EndMeasure |
Public method | GetReportData | (Overrides ProfileCounterGetReportData(ProfileReportCounterData, ProfileReportOptions).)
Protected method | OnFrameTick | (Overrides ProfileCounterOnFrameTick.)
Public method | Reset | (Overrides ProfileCounterReset.)
Public method | Set |
Top
Fields
 | Name | Description
Protected field | lastUsed | (Inherited from ProfileCounter.)
Protected field | sampleCount | (Inherited from ProfileCounter.)
Protected field | used | (Inherited from ProfileCounter.)
Top
Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display. (Inherited from ProfileCounter.)
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters. (Inherited from ProfileCounter.)
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet. (Inherited from ProfileCounter.)
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing. (Inherited from ProfileCounter.)
Public property | LastValue |
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included. (Inherited from ProfileCounter.)
Public property | Parent | [GET] This counters parent counter. (Inherited from ProfileCounter.)
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry. (Inherited from ProfileCounter.)
Public property | ValueGraph |
Public property | ValueGraphCursor |
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame. (Inherited from ProfileCounter.)
Top
See Also

Reference

Duality Namespace


TimeCounter Constructor

TimeCounter Constructor
Initializes a new instance of the TimeCounter class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TimeCounter()
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter Fields

TimeCounter Fields

The TimeCounter type exposes the following members.

Fields
 | Name | Description
Protected field | lastUsed | (Inherited from ProfileCounter.)
Protected field | sampleCount | (Inherited from ProfileCounter.)
Protected field | used | (Inherited from ProfileCounter.)
Top
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter Methods

TimeCounter Methods

The TimeCounter type exposes the following members.

Methods
 | Name | Description
Public method | Add |
Public method | BeginMeasure |
Public method | EndMeasure |
Public method | GetReportData | (Overrides ProfileCounterGetReportData(ProfileReportCounterData, ProfileReportOptions).)
Protected method | OnFrameTick | (Overrides ProfileCounterOnFrameTick.)
Public method | Reset | (Overrides ProfileCounterReset.)
Public method | Set |
Top
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.Add Method

TimeCounterAdd Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Add(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.BeginMeasure Method

TimeCounterBeginMeasure Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void BeginMeasure()
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.EndMeasure Method

TimeCounterEndMeasure Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void EndMeasure()
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.GetReportData Method

TimeCounterGetReportData Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void GetReportData(
    out ProfileReportCounterData data,
    ProfileReportOptions options
)

Parameters

data
Type: DualityProfileReportCounterData
options
Type: DualityProfileReportOptions
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.OnFrameTick Method

TimeCounterOnFrameTick Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnFrameTick()
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.Reset Method

TimeCounterReset Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Reset()
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.Set Method

TimeCounterSet Method

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Set(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter Properties

TimeCounter Properties

The TimeCounter type exposes the following members.

Properties
 | Name | Description
Public property | DisplayName | [GET] The name that this ProfileCounter uses for value display. (Inherited from ProfileCounter.)
Public property | FullName | [GET / SET] The counters full name, including possibly existing parent counters. (Inherited from ProfileCounter.)
Public property | HasData | [GET] Returns whether this ProfileCounter has gathered and processed any usable data yet. (Inherited from ProfileCounter.)
Public property | IsSingleValue | [GET / SET] Specifies whether this is a single value counter that doesn't need any MinMax processing. (Inherited from ProfileCounter.)
Public property | LastValue |
Public property | Name | [GET / SET] The counters individual name, without any ancestor names included. (Inherited from ProfileCounter.)
Public property | Parent | [GET] This counters parent counter. (Inherited from ProfileCounter.)
Public property | ParentDepth | [GET] Returns the depths of this counters ancestry. (Inherited from ProfileCounter.)
Public property | ValueGraph |
Public property | ValueGraphCursor |
Public property | WasUsed | [GET] Returns whether this ProfileCounter was used last frame. (Inherited from ProfileCounter.)
Top
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.LastValue Property

TimeCounterLastValue Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LastValue { get; }

Property Value

Type: Single
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.ValueGraph Property

TimeCounterValueGraph Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float[] ValueGraph { get; }

Property Value

Type: Single
See Also

Reference

TimeCounter Class
Duality Namespace


TimeCounter.ValueGraphCursor Property

TimeCounterValueGraphCursor Property

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ValueGraphCursor { get; }

Property Value

Type: Int32
See Also

Reference

TimeCounter Class
Duality Namespace


TransformChangedEventArgs Class

TransformChangedEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityComponentEventArgs
DualityTransformChangedEventArgs

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TransformChangedEventArgs : ComponentEventArgs

The TransformChangedEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | TransformChangedEventArgs | Initializes a new instance of the TransformChangedEventArgs class
Top
Properties
 | Name | Description
Public property | Changes | [GET] The changes that have been made since the last update.
Public property | Component | [GET] The affected Component. (Inherited from ComponentEventArgs.)
Top
See Also

Reference

Duality Namespace


TransformChangedEventArgs Constructor

TransformChangedEventArgs Constructor
Initializes a new instance of the TransformChangedEventArgs class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TransformChangedEventArgs(
    Component transform,
    TransformDirtyFlags dirtyFlags
)

Parameters

transform
Type: DualityComponent
dirtyFlags
Type: Duality.ComponentsTransformDirtyFlags
See Also

Reference

TransformChangedEventArgs Class
Duality Namespace


TransformChangedEventArgs Properties

TransformChangedEventArgs Properties

The TransformChangedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Changes | [GET] The changes that have been made since the last update.
Public property | Component | [GET] The affected Component. (Inherited from ComponentEventArgs.)
Top
See Also

Reference

TransformChangedEventArgs Class
Duality Namespace


TransformChangedEventArgs.Changes Property

TransformChangedEventArgsChanges Property
[GET] The changes that have been made since the last update.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TransformDirtyFlags Changes { get; }

Property Value

Type: TransformDirtyFlags
See Also

Reference

TransformChangedEventArgs Class
Duality Namespace


Vector2 Structure

Vector2 Structure
Represents a 2D vector using two single-precision floating-point numbers.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Vector2 : IEquatable<Vector2>

The Vector2 type exposes the following members.

Constructors
 | Name | Description
Public method | Vector2(Single) | Constructs a new instance.
Public method | Vector2(Single, Single) | Constructs a new Vector2.
Top
Methods
 | Name | Description
 | Add | Adds two vectors.
 | AngleBetween(Vector2, Vector2) | Calculates the angle (in radians) between two vectors.
 | AngleBetween(Vector2, Vector2, Single) | Calculates the angle (in radians) between two vectors.
 | Divide(Vector2, Vector2, Vector2) | Divide a vector by the components of a vector (scale).
 | Divide(Vector2, Single, Vector2) | Divides a vector by a scalar.
 | Dot(Vector2, Vector2) | Calculate the dot (scalar) product of two vectors
 | Dot(Vector2, Vector2, Single) | Calculate the dot (scalar) product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector2) | Indicates whether the current vector is equal to another vector.
 | FromAngleLength | Constructs a new vector from angle and length.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector2, Vector2, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector2, Vector2, Single, Vector2) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Max(Vector2, Vector2) | Calculate the component-wise maximum of two vectors
 | Max(Vector2, Vector2, Vector2) | Calculate the component-wise maximum of two vectors
 | Min(Vector2, Vector2) | Calculate the component-wise minimum of two vectors
 | Min(Vector2, Vector2, Vector2) | Calculate the component-wise minimum of two vectors
 | Multiply(Vector2, Vector2, Vector2) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector2, Single, Vector2) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector2 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector2. (Overrides ValueTypeToString.)
 | Transform(Vector2, Matrix4) | Transforms the vector
 | Transform(Vector2, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector2, Matrix4, Vector2) | Transforms the vector
 | Transform(Vector2, Quaternion, Vector2) | Transforms a vector by a quaternion rotation.
Top
Operators
Name | Description
Addition | Adds the specified instances.
Division(Vector2, Vector2) | Divides the specified instance by a vector.
Division(Vector2, Single) | Divides the specified instance by a scalar.
Equality | Compares the specified instances for equality.
Inequality | Compares the specified instances for inequality.
Multiply(Single, Vector2) | Multiplies the specified instance by a scalar.
Multiply(Vector2, Vector2) | Scales the specified instance by a vector.
Multiply(Vector2, Single) | Multiplies the specified instance by a scalar.
Subtraction | Subtracts the specified instances.
UnaryNegation | Negates the specified instance.
Top
Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitX | Defines a unit-length Vector2 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector2 that points towards the Y-axis.
Public field | X | The X component of the Vector2.
Public field | Y | The Y component of the Vector2.
 | Zero | Defines a zero-length Vector2.
Top
Properties
 | Name | Description
Public property | Angle | Returns the vectors angle
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | PerpendicularLeft | Gets the perpendicular vector on the left side of this vector.
Public property | PerpendicularRight | Gets the perpendicular vector on the right side of this vector.
Top
See Also

Reference

Duality Namespace


Vector2 Constructor

Vector2 Constructor
Overload List
 | Name | Description
Public method | Vector2(Single) | Constructs a new instance.
Public method | Vector2(Single, Single) | Constructs a new Vector2.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2 Constructor (Single)

Vector2 Constructor (Single)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2(
    float value
)

Parameters

value
Type: SystemSingle
The value that will initialize this instance.
See Also

Reference

Vector2 Structure
Vector2 Overload
Duality Namespace


Vector2 Constructor (Single, Single)

Vector2 Constructor (Single, Single)
Constructs a new Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2(
    float x,
    float y
)

Parameters

x
Type: SystemSingle
The x coordinate of the net Vector2.
y
Type: SystemSingle
The y coordinate of the net Vector2.
See Also

Reference

Vector2 Structure
Vector2 Overload
Duality Namespace


Vector2 Fields

Vector2 Fields

The Vector2 type exposes the following members.

Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitX | Defines a unit-length Vector2 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector2 that points towards the Y-axis.
Public field | X | The X component of the Vector2.
Public field | Y | The Y component of the Vector2.
 | Zero | Defines a zero-length Vector2.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.One Field

Vector2One Field
Defines an instance with all components set to 1.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector2 One

Field Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.UnitX Field

Vector2UnitX Field
Defines a unit-length Vector2 that points towards the X-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector2 UnitX

Field Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.UnitY Field

Vector2UnitY Field
Defines a unit-length Vector2 that points towards the Y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector2 UnitY

Field Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.X Field

Vector2X Field
The X component of the Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float X

Field Value

Type: Single
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Y Field

Vector2Y Field
The Y component of the Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Y

Field Value

Type: Single
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Zero Field

Vector2Zero Field
Defines a zero-length Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector2 Zero

Field Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2 Methods

Vector2 Methods

The Vector2 type exposes the following members.

Methods
 | Name | Description
 | Add | Adds two vectors.
 | AngleBetween(Vector2, Vector2) | Calculates the angle (in radians) between two vectors.
 | AngleBetween(Vector2, Vector2, Single) | Calculates the angle (in radians) between two vectors.
 | Divide(Vector2, Vector2, Vector2) | Divide a vector by the components of a vector (scale).
 | Divide(Vector2, Single, Vector2) | Divides a vector by a scalar.
 | Dot(Vector2, Vector2) | Calculate the dot (scalar) product of two vectors
 | Dot(Vector2, Vector2, Single) | Calculate the dot (scalar) product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector2) | Indicates whether the current vector is equal to another vector.
 | FromAngleLength | Constructs a new vector from angle and length.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector2, Vector2, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector2, Vector2, Single, Vector2) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Max(Vector2, Vector2) | Calculate the component-wise maximum of two vectors
 | Max(Vector2, Vector2, Vector2) | Calculate the component-wise maximum of two vectors
 | Min(Vector2, Vector2) | Calculate the component-wise minimum of two vectors
 | Min(Vector2, Vector2, Vector2) | Calculate the component-wise minimum of two vectors
 | Multiply(Vector2, Vector2, Vector2) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector2, Single, Vector2) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector2 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector2. (Overrides ValueTypeToString.)
 | Transform(Vector2, Matrix4) | Transforms the vector
 | Transform(Vector2, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector2, Matrix4, Vector2) | Transforms the vector
 | Transform(Vector2, Quaternion, Vector2) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Add Method

Vector2Add Method
Adds two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref Vector2 a,
    ref Vector2 b,
    out Vector2 result
)

Parameters

a
Type: DualityVector2
Left operand.
b
Type: DualityVector2
Right operand.
result
Type: DualityVector2
Result of operation.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.AngleBetween Method

Vector2AngleBetween Method
Overload List
Name | Description
AngleBetween(Vector2, Vector2) | Calculates the angle (in radians) between two vectors.
AngleBetween(Vector2, Vector2, Single) | Calculates the angle (in radians) between two vectors.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.AngleBetween Method (Vector2, Vector2)

Vector2AngleBetween Method (Vector2, Vector2)
Calculates the angle (in radians) between two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float AngleBetween(
    Vector2 first,
    Vector2 second
)

Parameters

first
Type: DualityVector2
The first vector.
second
Type: DualityVector2
The second vector.

Return Value

Type: Single
Angle (in radians) between the vectors.
Remarks
Note that the returned angle is never bigger than the constant Pi.
See Also

Reference

Vector2 Structure
AngleBetween Overload
Duality Namespace


Vector2.AngleBetween Method (Vector2, Vector2, Single)

Vector2AngleBetween Method (Vector2, Vector2, Single)
Calculates the angle (in radians) between two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void AngleBetween(
    ref Vector2 first,
    ref Vector2 second,
    out float result
)

Parameters

first
Type: DualityVector2
The first vector.
second
Type: DualityVector2
The second vector.
result
Type: SystemSingle
Angle (in radians) between the vectors.
Remarks
Note that the returned angle is never bigger than the constant Pi.
See Also

Reference

Vector2 Structure
AngleBetween Overload
Duality Namespace


Vector2.Divide Method

Vector2Divide Method
Overload List
Name | Description
Divide(Vector2, Vector2, Vector2) | Divide a vector by the components of a vector (scale).
Divide(Vector2, Single, Vector2) | Divides a vector by a scalar.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Divide Method (Vector2, Vector2, Vector2)

Vector2Divide Method (Vector2, Vector2, Vector2)
Divide a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector2 vector,
    ref Vector2 scale,
    out Vector2 result
)

Parameters

vector
Type: DualityVector2
Left operand.
scale
Type: DualityVector2
Right operand.
result
Type: DualityVector2
Result of the operation.
See Also

Reference

Vector2 Structure
Divide Overload
Duality Namespace


Vector2.Divide Method (Vector2, Single, Vector2)

Vector2Divide Method (Vector2, Single, Vector2)
Divides a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector2 vector,
    float scale,
    out Vector2 result
)

Parameters

vector
Type: DualityVector2
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector2
Result of the operation.
See Also

Reference

Vector2 Structure
Divide Overload
Duality Namespace


Vector2.Dot Method

Vector2Dot Method
Overload List
Name | Description
Dot(Vector2, Vector2) | Calculate the dot (scalar) product of two vectors
Dot(Vector2, Vector2, Single) | Calculate the dot (scalar) product of two vectors
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Dot Method (Vector2, Vector2)

Vector2Dot Method (Vector2, Vector2)
Calculate the dot (scalar) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Dot(
    Vector2 left,
    Vector2 right
)

Parameters

left
Type: DualityVector2
First operand
right
Type: DualityVector2
Second operand

Return Value

Type: Single
The dot product of the two inputs
See Also

Reference

Vector2 Structure
Dot Overload
Duality Namespace


Vector2.Dot Method (Vector2, Vector2, Single)

Vector2Dot Method (Vector2, Vector2, Single)
Calculate the dot (scalar) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Dot(
    ref Vector2 left,
    ref Vector2 right,
    out float result
)

Parameters

left
Type: DualityVector2
First operand
right
Type: DualityVector2
Second operand
result
Type: SystemSingle
The dot product of the two inputs
See Also

Reference

Vector2 Structure
Dot Overload
Duality Namespace


Vector2.Equals Method

Vector2Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector2) | Indicates whether the current vector is equal to another vector.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Equals Method (Object)

Vector2Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare to.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Vector2 Structure
Equals Overload
Duality Namespace


Vector2.Equals Method (Vector2)

Vector2Equals Method (Vector2)
Indicates whether the current vector is equal to another vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Vector2 other
)

Parameters

other
Type: DualityVector2
A vector to compare with this vector.

Return Value

Type: Boolean
true if the current vector is equal to the vector parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Vector2 Structure
Equals Overload
Duality Namespace


Vector2.FromAngleLength Method

Vector2FromAngleLength Method
Constructs a new vector from angle and length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 FromAngleLength(
    float angle,
    float length
)

Parameters

angle
Type: SystemSingle
length
Type: SystemSingle

Return Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.GetHashCode Method

Vector2GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Lerp Method

Vector2Lerp Method
Overload List
Name | Description
Lerp(Vector2, Vector2, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
Lerp(Vector2, Vector2, Single, Vector2) | Returns a new Vector that is the linear blend of the 2 given Vectors
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Lerp Method (Vector2, Vector2, Single)

Vector2Lerp Method (Vector2, Vector2, Single)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 Lerp(
    Vector2 a,
    Vector2 b,
    float blend
)

Parameters

a
Type: DualityVector2
First input vector
b
Type: DualityVector2
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.

Return Value

Type: Vector2
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector2 Structure
Lerp Overload
Duality Namespace


Vector2.Lerp Method (Vector2, Vector2, Single, Vector2)

Vector2Lerp Method (Vector2, Vector2, Single, Vector2)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Lerp(
    ref Vector2 a,
    ref Vector2 b,
    float blend,
    out Vector2 result
)

Parameters

a
Type: DualityVector2
First input vector
b
Type: DualityVector2
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.
result
Type: DualityVector2
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector2 Structure
Lerp Overload
Duality Namespace


Vector2.Max Method

Vector2Max Method
Overload List
Name | Description
Max(Vector2, Vector2) | Calculate the component-wise maximum of two vectors
Max(Vector2, Vector2, Vector2) | Calculate the component-wise maximum of two vectors
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Max Method (Vector2, Vector2)

Vector2Max Method (Vector2, Vector2)
Calculate the component-wise maximum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 Max(
    Vector2 a,
    Vector2 b
)

Parameters

a
Type: DualityVector2
First operand
b
Type: DualityVector2
Second operand

Return Value

Type: Vector2
The component-wise maximum
See Also

Reference

Vector2 Structure
Max Overload
Duality Namespace


Vector2.Max Method (Vector2, Vector2, Vector2)

Vector2Max Method (Vector2, Vector2, Vector2)
Calculate the component-wise maximum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Max(
    ref Vector2 a,
    ref Vector2 b,
    out Vector2 result
)

Parameters

a
Type: DualityVector2
First operand
b
Type: DualityVector2
Second operand
result
Type: DualityVector2
The component-wise maximum
See Also

Reference

Vector2 Structure
Max Overload
Duality Namespace


Vector2.Min Method

Vector2Min Method
Overload List
Name | Description
Min(Vector2, Vector2) | Calculate the component-wise minimum of two vectors
Min(Vector2, Vector2, Vector2) | Calculate the component-wise minimum of two vectors
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Min Method (Vector2, Vector2)

Vector2Min Method (Vector2, Vector2)
Calculate the component-wise minimum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 Min(
    Vector2 a,
    Vector2 b
)

Parameters

a
Type: DualityVector2
First operand
b
Type: DualityVector2
Second operand

Return Value

Type: Vector2
The component-wise minimum
See Also

Reference

Vector2 Structure
Min Overload
Duality Namespace


Vector2.Min Method (Vector2, Vector2, Vector2)

Vector2Min Method (Vector2, Vector2, Vector2)
Calculate the component-wise minimum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Min(
    ref Vector2 a,
    ref Vector2 b,
    out Vector2 result
)

Parameters

a
Type: DualityVector2
First operand
b
Type: DualityVector2
Second operand
result
Type: DualityVector2
The component-wise minimum
See Also

Reference

Vector2 Structure
Min Overload
Duality Namespace


Vector2.Multiply Method

Vector2Multiply Method
Overload List
Name | Description
Multiply(Vector2, Vector2, Vector2) | Multiplies a vector by the components of a vector (scale).
Multiply(Vector2, Single, Vector2) | Multiplies a vector by a scalar.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Multiply Method (Vector2, Vector2, Vector2)

Vector2Multiply Method (Vector2, Vector2, Vector2)
Multiplies a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector2 vector,
    ref Vector2 scale,
    out Vector2 result
)

Parameters

vector
Type: DualityVector2
Left operand.
scale
Type: DualityVector2
Right operand.
result
Type: DualityVector2
Result of the operation.
See Also

Reference

Vector2 Structure
Multiply Overload
Duality Namespace


Vector2.Multiply Method (Vector2, Single, Vector2)

Vector2Multiply Method (Vector2, Single, Vector2)
Multiplies a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector2 vector,
    float scale,
    out Vector2 result
)

Parameters

vector
Type: DualityVector2
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector2
Result of the operation.
See Also

Reference

Vector2 Structure
Multiply Overload
Duality Namespace


Vector2.Normalize Method

Vector2Normalize Method
Scales the Vector2 to unit length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Subtract Method

Vector2Subtract Method
Subtract one Vector from another

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Subtract(
    ref Vector2 a,
    ref Vector2 b,
    out Vector2 result
)

Parameters

a
Type: DualityVector2
First operand
b
Type: DualityVector2
Second operand
result
Type: DualityVector2
Result of subtraction
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.ToString Method

Vector2ToString Method
Returns a System.String that represents the current Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Transform Method

Vector2Transform Method
Overload List
Name | Description
Transform(Vector2, Matrix4) | Transforms the vector
Transform(Vector2, Quaternion) | Transforms a vector by a quaternion rotation.
Transform(Vector2, Matrix4, Vector2) | Transforms the vector
Transform(Vector2, Quaternion, Vector2) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Transform Method (Vector2, Matrix4)

Vector2Transform Method (Vector2, Matrix4)
Transforms the vector

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 Transform(
    Vector2 vec,
    Matrix4 mat
)

Parameters

vec
Type: DualityVector2
mat
Type: DualityMatrix4

Return Value

Type: Vector2
See Also

Reference

Vector2 Structure
Transform Overload
Duality Namespace


Vector2.Transform Method (Vector2, Quaternion)

Vector2Transform Method (Vector2, Quaternion)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 Transform(
    Vector2 vec,
    Quaternion quat
)

Parameters

vec
Type: DualityVector2
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.

Return Value

Type: Vector2
The result of the operation.
See Also

Reference

Vector2 Structure
Transform Overload
Duality Namespace


Vector2.Transform Method (Vector2, Matrix4, Vector2)

Vector2Transform Method (Vector2, Matrix4, Vector2)
Transforms the vector

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector2 vec,
    ref Matrix4 mat,
    out Vector2 result
)

Parameters

vec
Type: DualityVector2
mat
Type: DualityMatrix4
result
Type: DualityVector2

Return Value

Type:
See Also

Reference

Vector2 Structure
Transform Overload
Duality Namespace


Vector2.Transform Method (Vector2, Quaternion, Vector2)

Vector2Transform Method (Vector2, Quaternion, Vector2)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector2 vec,
    ref Quaternion quat,
    out Vector2 result
)

Parameters

vec
Type: DualityVector2
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.
result
Type: DualityVector2
The result of the operation.
See Also

Reference

Vector2 Structure
Transform Overload
Duality Namespace


Vector2 Operators

Vector2 Operators

The Vector2 type exposes the following members.

Operators
Name | Description
Addition | Adds the specified instances.
Division(Vector2, Vector2) | Divides the specified instance by a vector.
Division(Vector2, Single) | Divides the specified instance by a scalar.
Equality | Compares the specified instances for equality.
Inequality | Compares the specified instances for inequality.
Multiply(Single, Vector2) | Multiplies the specified instance by a scalar.
Multiply(Vector2, Vector2) | Scales the specified instance by a vector.
Multiply(Vector2, Single) | Multiplies the specified instance by a scalar.
Subtraction | Subtracts the specified instances.
UnaryNegation | Negates the specified instance.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Addition Operator

Vector2Addition Operator
Adds the specified instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator +(
    Vector2 left,
    Vector2 right
)

Parameters

left
Type: DualityVector2
Left operand.
right
Type: DualityVector2
Right operand.

Return Value

Type: Vector2
Result of addition.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Division Operator

Vector2Division Operator
Overload List
Name | Description
Division(Vector2, Vector2) | Divides the specified instance by a vector.
Division(Vector2, Single) | Divides the specified instance by a scalar.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Division Operator (Vector2, Vector2)

Vector2Division Operator (Vector2, Vector2)
Divides the specified instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator /(
    Vector2 vec,
    Vector2 scale
)

Parameters

vec
Type: DualityVector2
Left operand
scale
Type: DualityVector2
Right operand

Return Value

Type: Vector2
Result of the division.
See Also

Reference

Vector2 Structure
Division Overload
Duality Namespace


Vector2.Division Operator (Vector2, Single)

Vector2Division Operator (Vector2, Single)
Divides the specified instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator /(
    Vector2 vec,
    float scale
)

Parameters

vec
Type: DualityVector2
Left operand
scale
Type: SystemSingle
Right operand

Return Value

Type: Vector2
Result of the division.
See Also

Reference

Vector2 Structure
Division Overload
Duality Namespace


Vector2.Equality Operator

Vector2Equality Operator
Compares the specified instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Vector2 left,
    Vector2 right
)

Parameters

left
Type: DualityVector2
Left operand.
right
Type: DualityVector2
Right operand.

Return Value

Type: Boolean
True if both instances are equal; false otherwise.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Inequality Operator

Vector2Inequality Operator
Compares the specified instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Vector2 left,
    Vector2 right
)

Parameters

left
Type: DualityVector2
Left operand.
right
Type: DualityVector2
Right operand.

Return Value

Type: Boolean
True if both instances are not equal; false otherwise.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Multiply Operator

Vector2Multiply Operator
Overload List
Name | Description
Multiply(Single, Vector2) | Multiplies the specified instance by a scalar.
Multiply(Vector2, Vector2) | Scales the specified instance by a vector.
Multiply(Vector2, Single) | Multiplies the specified instance by a scalar.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Multiply Operator (Single, Vector2)

Vector2Multiply Operator (Single, Vector2)
Multiplies the specified instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator *(
    float scale,
    Vector2 vec
)

Parameters

scale
Type: SystemSingle
Left operand.
vec
Type: DualityVector2
Right operand.

Return Value

Type: Vector2
Result of multiplication.
See Also

Reference

Vector2 Structure
Multiply Overload
Duality Namespace


Vector2.Multiply Operator (Vector2, Vector2)

Vector2Multiply Operator (Vector2, Vector2)
Scales the specified instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator *(
    Vector2 vec,
    Vector2 scale
)

Parameters

vec
Type: DualityVector2
Left operand.
scale
Type: DualityVector2
Right operand.

Return Value

Type: Vector2
Result of multiplication.
See Also

Reference

Vector2 Structure
Multiply Overload
Duality Namespace


Vector2.Multiply Operator (Vector2, Single)

Vector2Multiply Operator (Vector2, Single)
Multiplies the specified instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator *(
    Vector2 vec,
    float scale
)

Parameters

vec
Type: DualityVector2
Left operand.
scale
Type: SystemSingle
Right operand.

Return Value

Type: Vector2
Result of multiplication.
See Also

Reference

Vector2 Structure
Multiply Overload
Duality Namespace


Vector2.Subtraction Operator

Vector2Subtraction Operator
Subtracts the specified instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator -(
    Vector2 left,
    Vector2 right
)

Parameters

left
Type: DualityVector2
Left operand.
right
Type: DualityVector2
Right operand.

Return Value

Type: Vector2
Result of subtraction.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.UnaryNegation Operator

Vector2UnaryNegation Operator
Negates the specified instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector2 operator -(
    Vector2 vec
)

Parameters

vec
Type: DualityVector2
Operand.

Return Value

Type: Vector2
Result of negation.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2 Properties

Vector2 Properties

The Vector2 type exposes the following members.

Properties
 | Name | Description
Public property | Angle | Returns the vectors angle
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | PerpendicularLeft | Gets the perpendicular vector on the left side of this vector.
Public property | PerpendicularRight | Gets the perpendicular vector on the right side of this vector.
Top
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Angle Property

Vector2Angle Property
Returns the vectors angle

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Angle { get; }

Property Value

Type: Single
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Item Property

Vector2Item Property
Gets or sets the value at the index of the Vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float this[
    int index
] { get; set; }

Parameters

index
Type: SystemInt32

Property Value

Type: Single
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Length Property

Vector2Length Property
Gets the length (magnitude) of the vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Length { get; }

Property Value

Type: Single
See Also

Reference

Vector2 Structure
Duality Namespace
Vector2LengthSquared


Vector2.LengthSquared Property

Vector2LengthSquared Property
Gets the square of the vector length (magnitude).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float LengthSquared { get; }

Property Value

Type: Single
Remarks
This property avoids the costly square root operation required by the Length property. This makes it more suitable for comparisons.
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.Normalized Property

Vector2Normalized Property
Returns a normalized version of this vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Normalized { get; }

Property Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.PerpendicularLeft Property

Vector2PerpendicularLeft Property
Gets the perpendicular vector on the left side of this vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 PerpendicularLeft { get; }

Property Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector2.PerpendicularRight Property

Vector2PerpendicularRight Property
Gets the perpendicular vector on the right side of this vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 PerpendicularRight { get; }

Property Value

Type: Vector2
See Also

Reference

Vector2 Structure
Duality Namespace


Vector3 Structure

Vector3 Structure
Represents a 3D vector using three single-precision floating-point numbers.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Vector3 : IEquatable<Vector3>

The Vector3 type exposes the following members.

Constructors
 | Name | Description
Public method | Vector3(Single) | Constructs a new instance.
Public method | Vector3(Vector2) | Constructs a new Vector3 from the given Vector2.
Public method | Vector3(Vector2, Single) | Constructs a new Vector3 from the given Vector2.
Public method | Vector3(Single, Single, Single) | Constructs a new Vector3.
Top
Methods
 | Name | Description
 | Add | Adds two vectors.
 | AngleBetween(Vector3, Vector3) | Calculates the angle (in radians) between two vectors.
 | AngleBetween(Vector3, Vector3, Single) | Calculates the angle (in radians) between two vectors.
 | Cross(Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
 | Cross(Vector3, Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
 | Distance | Calculates the distance between two points described by two vectors.
 | Divide(Vector3, Vector3, Vector3) | Divide a vector by the components of a vector (scale).
 | Divide(Vector3, Single, Vector3) | Divides a vector by a scalar.
 | Dot(Vector3, Vector3) | Calculate the dot (scalar) product of two vectors
 | Dot(Vector3, Vector3, Single) | Calculate the dot (scalar) product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector3) | Indicates whether the current vector is equal to another vector.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector3, Vector3, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector3, Vector3, Single, Vector3) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Max(Vector3, Vector3) | Calculate the component-wise maximum of two vectors
 | Max(Vector3, Vector3, Vector3) | Calculate the component-wise maximum of two vectors
 | Min(Vector3, Vector3) | Calculate the component-wise minimum of two vectors
 | Min(Vector3, Vector3, Vector3) | Calculate the component-wise minimum of two vectors
 | Multiply(Vector3, Vector3, Vector3) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector3, Single, Vector3) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector3 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector3. (Overrides ValueTypeToString.)
 | Transform(Vector3, Matrix4) | Transform a Vector by the given Matrix
 | Transform(Vector3, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector3, Matrix4, Vector3) | Transform a Vector by the given Matrix
 | Transform(Vector3, Quaternion, Vector3) | Transforms a vector by a quaternion rotation.
Top
Operators
Name | Description
Addition | Adds two instances.
Division(Vector3, Vector3) | Divides an instance by a vector.
Division(Vector3, Single) | Divides an instance by a scalar.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Vector3) | Multiplies an instance by a scalar.
Multiply(Vector3, Vector3) | Scales an instance by a vector.
Multiply(Vector3, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
UnaryNegation | Negates an instance.
Top
Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitX | Defines a unit-length Vector3 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector3 that points towards the Y-axis.
 | UnitZ | /// Defines a unit-length Vector3 that points towards the Z-axis.
Public field | X | The X component of the Vector3.
Public field | Y | The Y component of the Vector3.
Public field | Z | The Z component of the Vector3.
 | Zero | Defines a zero-length Vector3.
Top
Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | Xy | Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
Top
See Also

Reference

Duality Namespace


Vector3 Constructor

Vector3 Constructor
Overload List
 | Name | Description
Public method | Vector3(Single) | Constructs a new instance.
Public method | Vector3(Vector2) | Constructs a new Vector3 from the given Vector2.
Public method | Vector3(Vector2, Single) | Constructs a new Vector3 from the given Vector2.
Public method | Vector3(Single, Single, Single) | Constructs a new Vector3.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3 Constructor (Single)

Vector3 Constructor (Single)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3(
    float value
)

Parameters

value
Type: SystemSingle
The value that will initialize this instance.
See Also

Reference

Vector3 Structure
Vector3 Overload
Duality Namespace


Vector3 Constructor (Vector2)

Vector3 Constructor (Vector2)
Constructs a new Vector3 from the given Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3(
    Vector2 v
)

Parameters

v
Type: DualityVector2
The Vector2 to copy components from.
See Also

Reference

Vector3 Structure
Vector3 Overload
Duality Namespace


Vector3 Constructor (Vector2, Single)

Vector3 Constructor (Vector2, Single)
Constructs a new Vector3 from the given Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3(
    Vector2 v,
    float z
)

Parameters

v
Type: DualityVector2
The Vector2 to copy components from.
z
Type: SystemSingle
See Also

Reference

Vector3 Structure
Vector3 Overload
Duality Namespace


Vector3 Constructor (Single, Single, Single)

Vector3 Constructor (Single, Single, Single)
Constructs a new Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3(
    float x,
    float y,
    float z
)

Parameters

x
Type: SystemSingle
The x component of the Vector3.
y
Type: SystemSingle
The y component of the Vector3.
z
Type: SystemSingle
The z component of the Vector3.
See Also

Reference

Vector3 Structure
Vector3 Overload
Duality Namespace


Vector3 Fields

Vector3 Fields

The Vector3 type exposes the following members.

Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitX | Defines a unit-length Vector3 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector3 that points towards the Y-axis.
 | UnitZ | /// Defines a unit-length Vector3 that points towards the Z-axis.
Public field | X | The X component of the Vector3.
Public field | Y | The Y component of the Vector3.
Public field | Z | The Z component of the Vector3.
 | Zero | Defines a zero-length Vector3.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.One Field

Vector3One Field
Defines an instance with all components set to 1.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector3 One

Field Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.UnitX Field

Vector3UnitX Field
Defines a unit-length Vector3 that points towards the X-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector3 UnitX

Field Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.UnitY Field

Vector3UnitY Field
Defines a unit-length Vector3 that points towards the Y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector3 UnitY

Field Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.UnitZ Field

Vector3UnitZ Field
/// Defines a unit-length Vector3 that points towards the Z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector3 UnitZ

Field Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.X Field

Vector3X Field
The X component of the Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float X

Field Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Y Field

Vector3Y Field
The Y component of the Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Y

Field Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Z Field

Vector3Z Field
The Z component of the Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Z

Field Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Zero Field

Vector3Zero Field
Defines a zero-length Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector3 Zero

Field Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3 Methods

Vector3 Methods

The Vector3 type exposes the following members.

Methods
 | Name | Description
 | Add | Adds two vectors.
 | AngleBetween(Vector3, Vector3) | Calculates the angle (in radians) between two vectors.
 | AngleBetween(Vector3, Vector3, Single) | Calculates the angle (in radians) between two vectors.
 | Cross(Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
 | Cross(Vector3, Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
 | Distance | Calculates the distance between two points described by two vectors.
 | Divide(Vector3, Vector3, Vector3) | Divide a vector by the components of a vector (scale).
 | Divide(Vector3, Single, Vector3) | Divides a vector by a scalar.
 | Dot(Vector3, Vector3) | Calculate the dot (scalar) product of two vectors
 | Dot(Vector3, Vector3, Single) | Calculate the dot (scalar) product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector3) | Indicates whether the current vector is equal to another vector.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector3, Vector3, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector3, Vector3, Single, Vector3) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Max(Vector3, Vector3) | Calculate the component-wise maximum of two vectors
 | Max(Vector3, Vector3, Vector3) | Calculate the component-wise maximum of two vectors
 | Min(Vector3, Vector3) | Calculate the component-wise minimum of two vectors
 | Min(Vector3, Vector3, Vector3) | Calculate the component-wise minimum of two vectors
 | Multiply(Vector3, Vector3, Vector3) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector3, Single, Vector3) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector3 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector3. (Overrides ValueTypeToString.)
 | Transform(Vector3, Matrix4) | Transform a Vector by the given Matrix
 | Transform(Vector3, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector3, Matrix4, Vector3) | Transform a Vector by the given Matrix
 | Transform(Vector3, Quaternion, Vector3) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Add Method

Vector3Add Method
Adds two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref Vector3 a,
    ref Vector3 b,
    out Vector3 result
)

Parameters

a
Type: DualityVector3
Left operand.
b
Type: DualityVector3
Right operand.
result
Type: DualityVector3
Result of operation.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.AngleBetween Method

Vector3AngleBetween Method
Overload List
Name | Description
AngleBetween(Vector3, Vector3) | Calculates the angle (in radians) between two vectors.
AngleBetween(Vector3, Vector3, Single) | Calculates the angle (in radians) between two vectors.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.AngleBetween Method (Vector3, Vector3)

Vector3AngleBetween Method (Vector3, Vector3)
Calculates the angle (in radians) between two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float AngleBetween(
    Vector3 first,
    Vector3 second
)

Parameters

first
Type: DualityVector3
The first vector.
second
Type: DualityVector3
The second vector.

Return Value

Type: Single
Angle (in radians) between the vectors.
Remarks
Note that the returned angle is never bigger than the constant Pi.
See Also

Reference

Vector3 Structure
AngleBetween Overload
Duality Namespace


Vector3.AngleBetween Method (Vector3, Vector3, Single)

Vector3AngleBetween Method (Vector3, Vector3, Single)
Calculates the angle (in radians) between two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void AngleBetween(
    ref Vector3 first,
    ref Vector3 second,
    out float result
)

Parameters

first
Type: DualityVector3
The first vector.
second
Type: DualityVector3
The second vector.
result
Type: SystemSingle
Angle (in radians) between the vectors.
Remarks
Note that the returned angle is never bigger than the constant Pi.
See Also

Reference

Vector3 Structure
AngleBetween Overload
Duality Namespace


Vector3.Cross Method

Vector3Cross Method
Overload List
Name | Description
Cross(Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
Cross(Vector3, Vector3, Vector3) | Caclulate the cross (vector) product of two vectors
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Cross Method (Vector3, Vector3)

Vector3Cross Method (Vector3, Vector3)
Caclulate the cross (vector) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Cross(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
First operand
right
Type: DualityVector3
Second operand

Return Value

Type: Vector3
The cross product of the two inputs
See Also

Reference

Vector3 Structure
Cross Overload
Duality Namespace


Vector3.Cross Method (Vector3, Vector3, Vector3)

Vector3Cross Method (Vector3, Vector3, Vector3)
Caclulate the cross (vector) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Cross(
    ref Vector3 left,
    ref Vector3 right,
    out Vector3 result
)

Parameters

left
Type: DualityVector3
First operand
right
Type: DualityVector3
Second operand
result
Type: DualityVector3
The cross product of the two inputs

Return Value

Type:
The cross product of the two inputs
See Also

Reference

Vector3 Structure
Cross Overload
Duality Namespace


Vector3.Distance Method

Vector3Distance Method
Calculates the distance between two points described by two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Distance(
    ref Vector3 left,
    ref Vector3 right
)

Parameters

left
Type: DualityVector3
right
Type: DualityVector3

Return Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Divide Method

Vector3Divide Method
Overload List
Name | Description
Divide(Vector3, Vector3, Vector3) | Divide a vector by the components of a vector (scale).
Divide(Vector3, Single, Vector3) | Divides a vector by a scalar.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Divide Method (Vector3, Vector3, Vector3)

Vector3Divide Method (Vector3, Vector3, Vector3)
Divide a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector3 vector,
    ref Vector3 scale,
    out Vector3 result
)

Parameters

vector
Type: DualityVector3
Left operand.
scale
Type: DualityVector3
Right operand.
result
Type: DualityVector3
Result of the operation.
See Also

Reference

Vector3 Structure
Divide Overload
Duality Namespace


Vector3.Divide Method (Vector3, Single, Vector3)

Vector3Divide Method (Vector3, Single, Vector3)
Divides a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector3 vector,
    float scale,
    out Vector3 result
)

Parameters

vector
Type: DualityVector3
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector3
Result of the operation.
See Also

Reference

Vector3 Structure
Divide Overload
Duality Namespace


Vector3.Dot Method

Vector3Dot Method
Overload List
Name | Description
Dot(Vector3, Vector3) | Calculate the dot (scalar) product of two vectors
Dot(Vector3, Vector3, Single) | Calculate the dot (scalar) product of two vectors
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Dot Method (Vector3, Vector3)

Vector3Dot Method (Vector3, Vector3)
Calculate the dot (scalar) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Dot(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
First operand
right
Type: DualityVector3
Second operand

Return Value

Type: Single
The dot product of the two inputs
See Also

Reference

Vector3 Structure
Dot Overload
Duality Namespace


Vector3.Dot Method (Vector3, Vector3, Single)

Vector3Dot Method (Vector3, Vector3, Single)
Calculate the dot (scalar) product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Dot(
    ref Vector3 left,
    ref Vector3 right,
    out float result
)

Parameters

left
Type: DualityVector3
First operand
right
Type: DualityVector3
Second operand
result
Type: SystemSingle
The dot product of the two inputs
See Also

Reference

Vector3 Structure
Dot Overload
Duality Namespace


Vector3.Equals Method

Vector3Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector3) | Indicates whether the current vector is equal to another vector.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Equals Method (Object)

Vector3Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare to.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Vector3 Structure
Equals Overload
Duality Namespace


Vector3.Equals Method (Vector3)

Vector3Equals Method (Vector3)
Indicates whether the current vector is equal to another vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Vector3 other
)

Parameters

other
Type: DualityVector3
A vector to compare with this vector.

Return Value

Type: Boolean
true if the current vector is equal to the vector parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Vector3 Structure
Equals Overload
Duality Namespace


Vector3.GetHashCode Method

Vector3GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Lerp Method

Vector3Lerp Method
Overload List
Name | Description
Lerp(Vector3, Vector3, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
Lerp(Vector3, Vector3, Single, Vector3) | Returns a new Vector that is the linear blend of the 2 given Vectors
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Lerp Method (Vector3, Vector3, Single)

Vector3Lerp Method (Vector3, Vector3, Single)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Lerp(
    Vector3 a,
    Vector3 b,
    float blend
)

Parameters

a
Type: DualityVector3
First input vector
b
Type: DualityVector3
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.

Return Value

Type: Vector3
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector3 Structure
Lerp Overload
Duality Namespace


Vector3.Lerp Method (Vector3, Vector3, Single, Vector3)

Vector3Lerp Method (Vector3, Vector3, Single, Vector3)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Lerp(
    ref Vector3 a,
    ref Vector3 b,
    float blend,
    out Vector3 result
)

Parameters

a
Type: DualityVector3
First input vector
b
Type: DualityVector3
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.
result
Type: DualityVector3
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector3 Structure
Lerp Overload
Duality Namespace


Vector3.Max Method

Vector3Max Method
Overload List
Name | Description
Max(Vector3, Vector3) | Calculate the component-wise maximum of two vectors
Max(Vector3, Vector3, Vector3) | Calculate the component-wise maximum of two vectors
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Max Method (Vector3, Vector3)

Vector3Max Method (Vector3, Vector3)
Calculate the component-wise maximum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Max(
    Vector3 a,
    Vector3 b
)

Parameters

a
Type: DualityVector3
First operand
b
Type: DualityVector3
Second operand

Return Value

Type: Vector3
The component-wise maximum
See Also

Reference

Vector3 Structure
Max Overload
Duality Namespace


Vector3.Max Method (Vector3, Vector3, Vector3)

Vector3Max Method (Vector3, Vector3, Vector3)
Calculate the component-wise maximum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Max(
    ref Vector3 a,
    ref Vector3 b,
    out Vector3 result
)

Parameters

a
Type: DualityVector3
First operand
b
Type: DualityVector3
Second operand
result
Type: DualityVector3
The component-wise maximum
See Also

Reference

Vector3 Structure
Max Overload
Duality Namespace


Vector3.Min Method

Vector3Min Method
Overload List
Name | Description
Min(Vector3, Vector3) | Calculate the component-wise minimum of two vectors
Min(Vector3, Vector3, Vector3) | Calculate the component-wise minimum of two vectors
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Min Method (Vector3, Vector3)

Vector3Min Method (Vector3, Vector3)
Calculate the component-wise minimum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Min(
    Vector3 a,
    Vector3 b
)

Parameters

a
Type: DualityVector3
First operand
b
Type: DualityVector3
Second operand

Return Value

Type: Vector3
The component-wise minimum
See Also

Reference

Vector3 Structure
Min Overload
Duality Namespace


Vector3.Min Method (Vector3, Vector3, Vector3)

Vector3Min Method (Vector3, Vector3, Vector3)
Calculate the component-wise minimum of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Min(
    ref Vector3 a,
    ref Vector3 b,
    out Vector3 result
)

Parameters

a
Type: DualityVector3
First operand
b
Type: DualityVector3
Second operand
result
Type: DualityVector3
The component-wise minimum
See Also

Reference

Vector3 Structure
Min Overload
Duality Namespace


Vector3.Multiply Method

Vector3Multiply Method
Overload List
Name | Description
Multiply(Vector3, Vector3, Vector3) | Multiplies a vector by the components of a vector (scale).
Multiply(Vector3, Single, Vector3) | Multiplies a vector by a scalar.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Multiply Method (Vector3, Vector3, Vector3)

Vector3Multiply Method (Vector3, Vector3, Vector3)
Multiplies a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector3 vector,
    ref Vector3 scale,
    out Vector3 result
)

Parameters

vector
Type: DualityVector3
Left operand.
scale
Type: DualityVector3
Right operand.
result
Type: DualityVector3
Result of the operation.
See Also

Reference

Vector3 Structure
Multiply Overload
Duality Namespace


Vector3.Multiply Method (Vector3, Single, Vector3)

Vector3Multiply Method (Vector3, Single, Vector3)
Multiplies a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector3 vector,
    float scale,
    out Vector3 result
)

Parameters

vector
Type: DualityVector3
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector3
Result of the operation.
See Also

Reference

Vector3 Structure
Multiply Overload
Duality Namespace


Vector3.Normalize Method

Vector3Normalize Method
Scales the Vector3 to unit length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Subtract Method

Vector3Subtract Method
Subtract one Vector from another

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Subtract(
    ref Vector3 a,
    ref Vector3 b,
    out Vector3 result
)

Parameters

a
Type: DualityVector3
First operand
b
Type: DualityVector3
Second operand
result
Type: DualityVector3
Result of subtraction
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.ToString Method

Vector3ToString Method
Returns a System.String that represents the current Vector3.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Transform Method

Vector3Transform Method
Overload List
Name | Description
Transform(Vector3, Matrix4) | Transform a Vector by the given Matrix
Transform(Vector3, Quaternion) | Transforms a vector by a quaternion rotation.
Transform(Vector3, Matrix4, Vector3) | Transform a Vector by the given Matrix
Transform(Vector3, Quaternion, Vector3) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Transform Method (Vector3, Matrix4)

Vector3Transform Method (Vector3, Matrix4)
Transform a Vector by the given Matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Transform(
    Vector3 vec,
    Matrix4 mat
)

Parameters

vec
Type: DualityVector3
The vector to transform
mat
Type: DualityMatrix4
The desired transformation

Return Value

Type: Vector3
The transformed vector
See Also

Reference

Vector3 Structure
Transform Overload
Duality Namespace


Vector3.Transform Method (Vector3, Quaternion)

Vector3Transform Method (Vector3, Quaternion)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 Transform(
    Vector3 vec,
    Quaternion quat
)

Parameters

vec
Type: DualityVector3
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.

Return Value

Type: Vector3
The result of the operation.
See Also

Reference

Vector3 Structure
Transform Overload
Duality Namespace


Vector3.Transform Method (Vector3, Matrix4, Vector3)

Vector3Transform Method (Vector3, Matrix4, Vector3)
Transform a Vector by the given Matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector3 vec,
    ref Matrix4 mat,
    out Vector3 result
)

Parameters

vec
Type: DualityVector3
The vector to transform
mat
Type: DualityMatrix4
The desired transformation
result
Type: DualityVector3
The transformed vector
See Also

Reference

Vector3 Structure
Transform Overload
Duality Namespace


Vector3.Transform Method (Vector3, Quaternion, Vector3)

Vector3Transform Method (Vector3, Quaternion, Vector3)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector3 vec,
    ref Quaternion quat,
    out Vector3 result
)

Parameters

vec
Type: DualityVector3
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.
result
Type: DualityVector3
The result of the operation.
See Also

Reference

Vector3 Structure
Transform Overload
Duality Namespace


Vector3 Operators

Vector3 Operators

The Vector3 type exposes the following members.

Operators
Name | Description
Addition | Adds two instances.
Division(Vector3, Vector3) | Divides an instance by a vector.
Division(Vector3, Single) | Divides an instance by a scalar.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Vector3) | Multiplies an instance by a scalar.
Multiply(Vector3, Vector3) | Scales an instance by a vector.
Multiply(Vector3, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
UnaryNegation | Negates an instance.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Addition Operator

Vector3Addition Operator
Adds two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator +(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
The first instance.
right
Type: DualityVector3
The second instance.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Division Operator

Vector3Division Operator
Overload List
Name | Description
Division(Vector3, Vector3) | Divides an instance by a vector.
Division(Vector3, Single) | Divides an instance by a scalar.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Division Operator (Vector3, Vector3)

Vector3Division Operator (Vector3, Vector3)
Divides an instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator /(
    Vector3 vec,
    Vector3 scale
)

Parameters

vec
Type: DualityVector3
The instance.
scale
Type: DualityVector3
The scalar.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Division Overload
Duality Namespace


Vector3.Division Operator (Vector3, Single)

Vector3Division Operator (Vector3, Single)
Divides an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator /(
    Vector3 vec,
    float scale
)

Parameters

vec
Type: DualityVector3
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Division Overload
Duality Namespace


Vector3.Equality Operator

Vector3Equality Operator
Compares two instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
The first instance.
right
Type: DualityVector3
The second instance.

Return Value

Type: Boolean
True, if left equals right; false otherwise.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Inequality Operator

Vector3Inequality Operator
Compares two instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
The first instance.
right
Type: DualityVector3
The second instance.

Return Value

Type: Boolean
True, if left does not equa lright; false otherwise.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Multiply Operator

Vector3Multiply Operator
Overload List
Name | Description
Multiply(Single, Vector3) | Multiplies an instance by a scalar.
Multiply(Vector3, Vector3) | Scales an instance by a vector.
Multiply(Vector3, Single) | Multiplies an instance by a scalar.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Multiply Operator (Single, Vector3)

Vector3Multiply Operator (Single, Vector3)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator *(
    float scale,
    Vector3 vec
)

Parameters

scale
Type: SystemSingle
The scalar.
vec
Type: DualityVector3
The instance.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Multiply Overload
Duality Namespace


Vector3.Multiply Operator (Vector3, Vector3)

Vector3Multiply Operator (Vector3, Vector3)
Scales an instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator *(
    Vector3 vec,
    Vector3 scale
)

Parameters

vec
Type: DualityVector3
The instance.
scale
Type: DualityVector3
The scale.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Multiply Overload
Duality Namespace


Vector3.Multiply Operator (Vector3, Single)

Vector3Multiply Operator (Vector3, Single)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator *(
    Vector3 vec,
    float scale
)

Parameters

vec
Type: DualityVector3
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Multiply Overload
Duality Namespace


Vector3.Subtraction Operator

Vector3Subtraction Operator
Subtracts two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator -(
    Vector3 left,
    Vector3 right
)

Parameters

left
Type: DualityVector3
The first instance.
right
Type: DualityVector3
The second instance.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.UnaryNegation Operator

Vector3UnaryNegation Operator
Negates an instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector3 operator -(
    Vector3 vec
)

Parameters

vec
Type: DualityVector3
The instance.

Return Value

Type: Vector3
The result of the calculation.
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3 Properties

Vector3 Properties

The Vector3 type exposes the following members.

Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | Xy | Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
Top
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Item Property

Vector3Item Property
Gets or sets the value at the index of the Vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float this[
    int index
] { get; set; }

Parameters

index
Type: SystemInt32

Property Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Length Property

Vector3Length Property
Gets the length (magnitude) of the vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Length { get; }

Property Value

Type: Single
See Also

Reference

Vector3 Structure
Duality Namespace
Vector3LengthSquared


Vector3.LengthSquared Property

Vector3LengthSquared Property
Gets the square of the vector length (magnitude).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float LengthSquared { get; }

Property Value

Type: Single
Remarks
This property avoids the costly square root operation required by the Length property. This makes it more suitable for comparisons.
See Also

Reference

Vector3 Structure
Duality Namespace
[!:LengthFast]


Vector3.Normalized Property

Vector3Normalized Property
Returns a normalized version of this vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Normalized { get; }

Property Value

Type: Vector3
See Also

Reference

Vector3 Structure
Duality Namespace


Vector3.Xy Property

Vector3Xy Property
Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Xy { get; set; }

Property Value

Type: Vector2
See Also

Reference

Vector3 Structure
Duality Namespace


Vector4 Structure

Vector4 Structure
Represents a 4D vector using four single-precision floating-point numbers.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct Vector4 : IEquatable<Vector4>

The Vector4 type exposes the following members.

Constructors
 | Name | Description
Public method | Vector4(Single) | Constructs a new instance.
Public method | Vector4(Vector2) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Vector3) | Constructs a new Vector4 from the given Vector3. The w component is initialized to 0.
Public method | Vector4(Vector2, Single) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Vector3, Single) | Constructs a new Vector4 from the specified Vector3 and w component.
Public method | Vector4(Vector2, Single, Single) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Single, Single, Single, Single) | Constructs a new Vector4.
Top
Methods
 | Name | Description
 | Add | Adds two vectors.
 | Divide(Vector4, Vector4, Vector4) | Divide a vector by the components of a vector (scale).
 | Divide(Vector4, Single, Vector4) | Divides a vector by a scalar.
 | Dot(Vector4, Vector4) | Calculate the dot product of two vectors
 | Dot(Vector4, Vector4, Single) | Calculate the dot product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector4) | Indicates whether the current vector is equal to another vector.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector4, Vector4, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector4, Vector4, Single, Vector4) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Multiply(Vector4, Vector4, Vector4) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector4, Single, Vector4) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector4 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector4. (Overrides ValueTypeToString.)
 | Transform(Vector4, Matrix4) | Transform a Vector by the given Matrix
 | Transform(Vector4, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector4, Matrix4, Vector4) | Transform a Vector by the given Matrix
 | Transform(Vector4, Quaternion, Vector4) | Transforms a vector by a quaternion rotation.
Top
Operators
Name | Description
Addition | Adds two instances.
Division(Vector4, Vector4) | Divides an instance by a vector.
Division(Vector4, Single) | Divides an instance by a scalar.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Vector4) | Multiplies an instance by a scalar.
Multiply(Vector4, Vector4) | Scales an instance by a vector.
Multiply(Vector4, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
UnaryNegation | Negates an instance.
Top
Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitW | Defines a unit-length Vector4 that points towards the W-axis.
 | UnitX | Defines a unit-length Vector4 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector4 that points towards the Y-axis.
 | UnitZ | Defines a unit-length Vector4 that points towards the Z-axis.
Public field | W | The W component of the Vector4.
Public field | X | The X component of the Vector4.
Public field | Y | The Y component of the Vector4.
Public field | Z | The Z component of the Vector4.
 | Zero | Defines a zero-length Vector4.
Top
Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | Xy | Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
Public property | Xyz | Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
Top
See Also

Reference

Duality Namespace


Vector4 Constructor

Vector4 Constructor
Overload List
 | Name | Description
Public method | Vector4(Single) | Constructs a new instance.
Public method | Vector4(Vector2) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Vector3) | Constructs a new Vector4 from the given Vector3. The w component is initialized to 0.
Public method | Vector4(Vector2, Single) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Vector3, Single) | Constructs a new Vector4 from the specified Vector3 and w component.
Public method | Vector4(Vector2, Single, Single) | Constructs a new Vector4 from the given Vector2.
Public method | Vector4(Single, Single, Single, Single) | Constructs a new Vector4.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4 Constructor (Single)

Vector4 Constructor (Single)
Constructs a new instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    float value
)

Parameters

value
Type: SystemSingle
The value that will initialize this instance.
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Constructor (Vector2)

Vector4 Constructor (Vector2)
Constructs a new Vector4 from the given Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    Vector2 v
)

Parameters

v
Type: DualityVector2
The Vector2 to copy components from.
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Constructor (Vector3)

Vector4 Constructor (Vector3)
Constructs a new Vector4 from the given Vector3. The w component is initialized to 0.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    Vector3 v
)

Parameters

v
Type: DualityVector3
The Vector3 to copy components from.
Remarks
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace
Vector4Vector4(Vector3, Single)


Vector4 Constructor (Vector2, Single)

Vector4 Constructor (Vector2, Single)
Constructs a new Vector4 from the given Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    Vector2 v,
    float z
)

Parameters

v
Type: DualityVector2
The Vector2 to copy components from.
z
Type: SystemSingle
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Constructor (Vector3, Single)

Vector4 Constructor (Vector3, Single)
Constructs a new Vector4 from the specified Vector3 and w component.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    Vector3 v,
    float w
)

Parameters

v
Type: DualityVector3
The Vector3 to copy components from.
w
Type: SystemSingle
The w component of the new Vector4.
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Constructor (Vector2, Single, Single)

Vector4 Constructor (Vector2, Single, Single)
Constructs a new Vector4 from the given Vector2.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    Vector2 v,
    float z,
    float w
)

Parameters

v
Type: DualityVector2
The Vector2 to copy components from.
z
Type: SystemSingle
w
Type: SystemSingle
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Constructor (Single, Single, Single, Single)

Vector4 Constructor (Single, Single, Single, Single)
Constructs a new Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4(
    float x,
    float y,
    float z,
    float w
)

Parameters

x
Type: SystemSingle
The x component of the Vector4.
y
Type: SystemSingle
The y component of the Vector4.
z
Type: SystemSingle
The z component of the Vector4.
w
Type: SystemSingle
The w component of the Vector4.
See Also

Reference

Vector4 Structure
Vector4 Overload
Duality Namespace


Vector4 Fields

Vector4 Fields

The Vector4 type exposes the following members.

Fields
 | Name | Description
 | One | Defines an instance with all components set to 1.
 | UnitW | Defines a unit-length Vector4 that points towards the W-axis.
 | UnitX | Defines a unit-length Vector4 that points towards the X-axis.
 | UnitY | Defines a unit-length Vector4 that points towards the Y-axis.
 | UnitZ | Defines a unit-length Vector4 that points towards the Z-axis.
Public field | W | The W component of the Vector4.
Public field | X | The X component of the Vector4.
Public field | Y | The Y component of the Vector4.
Public field | Z | The Z component of the Vector4.
 | Zero | Defines a zero-length Vector4.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.One Field

Vector4One Field
Defines an instance with all components set to 1.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly Vector4 One

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.UnitW Field

Vector4UnitW Field
Defines a unit-length Vector4 that points towards the W-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 UnitW

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.UnitX Field

Vector4UnitX Field
Defines a unit-length Vector4 that points towards the X-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 UnitX

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.UnitY Field

Vector4UnitY Field
Defines a unit-length Vector4 that points towards the Y-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 UnitY

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.UnitZ Field

Vector4UnitZ Field
Defines a unit-length Vector4 that points towards the Z-axis.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 UnitZ

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.W Field

Vector4W Field
The W component of the Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float W

Field Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.X Field

Vector4X Field
The X component of the Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float X

Field Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Y Field

Vector4Y Field
The Y component of the Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Y

Field Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Z Field

Vector4Z Field
The Z component of the Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Z

Field Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Zero Field

Vector4Zero Field
Defines a zero-length Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 Zero

Field Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4 Methods

Vector4 Methods

The Vector4 type exposes the following members.

Methods
 | Name | Description
 | Add | Adds two vectors.
 | Divide(Vector4, Vector4, Vector4) | Divide a vector by the components of a vector (scale).
 | Divide(Vector4, Single, Vector4) | Divides a vector by a scalar.
 | Dot(Vector4, Vector4) | Calculate the dot product of two vectors
 | Dot(Vector4, Vector4, Single) | Calculate the dot product of two vectors
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector4) | Indicates whether the current vector is equal to another vector.
Public method | GetHashCode | Returns the hashcode for this instance. (Overrides ValueTypeGetHashCode.)
 | Lerp(Vector4, Vector4, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Lerp(Vector4, Vector4, Single, Vector4) | Returns a new Vector that is the linear blend of the 2 given Vectors
 | Multiply(Vector4, Vector4, Vector4) | Multiplies a vector by the components of a vector (scale).
 | Multiply(Vector4, Single, Vector4) | Multiplies a vector by a scalar.
Public method | Normalize | Scales the Vector4 to unit length.
 | Subtract | Subtract one Vector from another
Public method | ToString | Returns a System.String that represents the current Vector4. (Overrides ValueTypeToString.)
 | Transform(Vector4, Matrix4) | Transform a Vector by the given Matrix
 | Transform(Vector4, Quaternion) | Transforms a vector by a quaternion rotation.
 | Transform(Vector4, Matrix4, Vector4) | Transform a Vector by the given Matrix
 | Transform(Vector4, Quaternion, Vector4) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Add Method

Vector4Add Method
Adds two vectors.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref Vector4 a,
    ref Vector4 b,
    out Vector4 result
)

Parameters

a
Type: DualityVector4
Left operand.
b
Type: DualityVector4
Right operand.
result
Type: DualityVector4
Result of operation.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Divide Method

Vector4Divide Method
Overload List
Name | Description
Divide(Vector4, Vector4, Vector4) | Divide a vector by the components of a vector (scale).
Divide(Vector4, Single, Vector4) | Divides a vector by a scalar.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Divide Method (Vector4, Vector4, Vector4)

Vector4Divide Method (Vector4, Vector4, Vector4)
Divide a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector4 vector,
    ref Vector4 scale,
    out Vector4 result
)

Parameters

vector
Type: DualityVector4
Left operand.
scale
Type: DualityVector4
Right operand.
result
Type: DualityVector4
Result of the operation.
See Also

Reference

Vector4 Structure
Divide Overload
Duality Namespace


Vector4.Divide Method (Vector4, Single, Vector4)

Vector4Divide Method (Vector4, Single, Vector4)
Divides a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Divide(
    ref Vector4 vector,
    float scale,
    out Vector4 result
)

Parameters

vector
Type: DualityVector4
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector4
Result of the operation.
See Also

Reference

Vector4 Structure
Divide Overload
Duality Namespace


Vector4.Dot Method

Vector4Dot Method
Overload List
Name | Description
Dot(Vector4, Vector4) | Calculate the dot product of two vectors
Dot(Vector4, Vector4, Single) | Calculate the dot product of two vectors
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Dot Method (Vector4, Vector4)

Vector4Dot Method (Vector4, Vector4)
Calculate the dot product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static float Dot(
    Vector4 left,
    Vector4 right
)

Parameters

left
Type: DualityVector4
First operand
right
Type: DualityVector4
Second operand

Return Value

Type: Single
The dot product of the two inputs
See Also

Reference

Vector4 Structure
Dot Overload
Duality Namespace


Vector4.Dot Method (Vector4, Vector4, Single)

Vector4Dot Method (Vector4, Vector4, Single)
Calculate the dot product of two vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Dot(
    ref Vector4 left,
    ref Vector4 right,
    out float result
)

Parameters

left
Type: DualityVector4
First operand
right
Type: DualityVector4
Second operand
result
Type: SystemSingle
The dot product of the two inputs
See Also

Reference

Vector4 Structure
Dot Overload
Duality Namespace


Vector4.Equals Method

Vector4Equals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).)
Public method | Equals(Vector4) | Indicates whether the current vector is equal to another vector.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Equals Method (Object)

Vector4Equals Method (Object)
Indicates whether this instance and a specified object are equal.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare to.

Return Value

Type: Boolean
True if the instances are equal; false otherwise.
See Also

Reference

Vector4 Structure
Equals Overload
Duality Namespace


Vector4.Equals Method (Vector4)

Vector4Equals Method (Vector4)
Indicates whether the current vector is equal to another vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    Vector4 other
)

Parameters

other
Type: DualityVector4
A vector to compare with this vector.

Return Value

Type: Boolean
true if the current vector is equal to the vector parameter; otherwise, false.

Implements

IEquatableTEquals(T)
See Also

Reference

Vector4 Structure
Equals Overload
Duality Namespace


Vector4.GetHashCode Method

Vector4GetHashCode Method
Returns the hashcode for this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
A System.Int32 containing the unique hashcode for this instance.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Lerp Method

Vector4Lerp Method
Overload List
Name | Description
Lerp(Vector4, Vector4, Single) | Returns a new Vector that is the linear blend of the 2 given Vectors
Lerp(Vector4, Vector4, Single, Vector4) | Returns a new Vector that is the linear blend of the 2 given Vectors
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Lerp Method (Vector4, Vector4, Single)

Vector4Lerp Method (Vector4, Vector4, Single)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 Lerp(
    Vector4 a,
    Vector4 b,
    float blend
)

Parameters

a
Type: DualityVector4
First input vector
b
Type: DualityVector4
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.

Return Value

Type: Vector4
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector4 Structure
Lerp Overload
Duality Namespace


Vector4.Lerp Method (Vector4, Vector4, Single, Vector4)

Vector4Lerp Method (Vector4, Vector4, Single, Vector4)
Returns a new Vector that is the linear blend of the 2 given Vectors

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Lerp(
    ref Vector4 a,
    ref Vector4 b,
    float blend,
    out Vector4 result
)

Parameters

a
Type: DualityVector4
First input vector
b
Type: DualityVector4
Second input vector
blend
Type: SystemSingle
The blend factor. a when blend=0, b when blend=1.
result
Type: DualityVector4
a when blend=0, b when blend=1, and a linear combination otherwise
See Also

Reference

Vector4 Structure
Lerp Overload
Duality Namespace


Vector4.Multiply Method

Vector4Multiply Method
Overload List
Name | Description
Multiply(Vector4, Vector4, Vector4) | Multiplies a vector by the components of a vector (scale).
Multiply(Vector4, Single, Vector4) | Multiplies a vector by a scalar.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Multiply Method (Vector4, Vector4, Vector4)

Vector4Multiply Method (Vector4, Vector4, Vector4)
Multiplies a vector by the components of a vector (scale).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector4 vector,
    ref Vector4 scale,
    out Vector4 result
)

Parameters

vector
Type: DualityVector4
Left operand.
scale
Type: DualityVector4
Right operand.
result
Type: DualityVector4
Result of the operation.
See Also

Reference

Vector4 Structure
Multiply Overload
Duality Namespace


Vector4.Multiply Method (Vector4, Single, Vector4)

Vector4Multiply Method (Vector4, Single, Vector4)
Multiplies a vector by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref Vector4 vector,
    float scale,
    out Vector4 result
)

Parameters

vector
Type: DualityVector4
Left operand.
scale
Type: SystemSingle
Right operand.
result
Type: DualityVector4
Result of the operation.
See Also

Reference

Vector4 Structure
Multiply Overload
Duality Namespace


Vector4.Normalize Method

Vector4Normalize Method
Scales the Vector4 to unit length.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void Normalize()
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Subtract Method

Vector4Subtract Method
Subtract one Vector from another

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Subtract(
    ref Vector4 a,
    ref Vector4 b,
    out Vector4 result
)

Parameters

a
Type: DualityVector4
First operand
b
Type: DualityVector4
Second operand
result
Type: DualityVector4
Result of subtraction
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.ToString Method

Vector4ToString Method
Returns a System.String that represents the current Vector4.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Transform Method

Vector4Transform Method
Overload List
Name | Description
Transform(Vector4, Matrix4) | Transform a Vector by the given Matrix
Transform(Vector4, Quaternion) | Transforms a vector by a quaternion rotation.
Transform(Vector4, Matrix4, Vector4) | Transform a Vector by the given Matrix
Transform(Vector4, Quaternion, Vector4) | Transforms a vector by a quaternion rotation.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Transform Method (Vector4, Matrix4)

Vector4Transform Method (Vector4, Matrix4)
Transform a Vector by the given Matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 Transform(
    Vector4 vec,
    Matrix4 mat
)

Parameters

vec
Type: DualityVector4
The vector to transform
mat
Type: DualityMatrix4
The desired transformation

Return Value

Type: Vector4
The transformed vector
See Also

Reference

Vector4 Structure
Transform Overload
Duality Namespace


Vector4.Transform Method (Vector4, Quaternion)

Vector4Transform Method (Vector4, Quaternion)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 Transform(
    Vector4 vec,
    Quaternion quat
)

Parameters

vec
Type: DualityVector4
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.

Return Value

Type: Vector4
The result of the operation.
See Also

Reference

Vector4 Structure
Transform Overload
Duality Namespace


Vector4.Transform Method (Vector4, Matrix4, Vector4)

Vector4Transform Method (Vector4, Matrix4, Vector4)
Transform a Vector by the given Matrix

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector4 vec,
    ref Matrix4 mat,
    out Vector4 result
)

Parameters

vec
Type: DualityVector4
The vector to transform
mat
Type: DualityMatrix4
The desired transformation
result
Type: DualityVector4
The transformed vector
See Also

Reference

Vector4 Structure
Transform Overload
Duality Namespace


Vector4.Transform Method (Vector4, Quaternion, Vector4)

Vector4Transform Method (Vector4, Quaternion, Vector4)
Transforms a vector by a quaternion rotation.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Transform(
    ref Vector4 vec,
    ref Quaternion quat,
    out Vector4 result
)

Parameters

vec
Type: DualityVector4
The vector to transform.
quat
Type: DualityQuaternion
The quaternion to rotate the vector by.
result
Type: DualityVector4
The result of the operation.
See Also

Reference

Vector4 Structure
Transform Overload
Duality Namespace


Vector4 Operators

Vector4 Operators

The Vector4 type exposes the following members.

Operators
Name | Description
Addition | Adds two instances.
Division(Vector4, Vector4) | Divides an instance by a vector.
Division(Vector4, Single) | Divides an instance by a scalar.
Equality | Compares two instances for equality.
Inequality | Compares two instances for inequality.
Multiply(Single, Vector4) | Multiplies an instance by a scalar.
Multiply(Vector4, Vector4) | Scales an instance by a vector.
Multiply(Vector4, Single) | Multiplies an instance by a scalar.
Subtraction | Subtracts two instances.
UnaryNegation | Negates an instance.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Addition Operator

Vector4Addition Operator
Adds two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator +(
    Vector4 left,
    Vector4 right
)

Parameters

left
Type: DualityVector4
The first instance.
right
Type: DualityVector4
The second instance.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Division Operator

Vector4Division Operator
Overload List
Name | Description
Division(Vector4, Vector4) | Divides an instance by a vector.
Division(Vector4, Single) | Divides an instance by a scalar.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Division Operator (Vector4, Vector4)

Vector4Division Operator (Vector4, Vector4)
Divides an instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator /(
    Vector4 vec,
    Vector4 scale
)

Parameters

vec
Type: DualityVector4
The instance.
scale
Type: DualityVector4
The scalar.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Division Overload
Duality Namespace


Vector4.Division Operator (Vector4, Single)

Vector4Division Operator (Vector4, Single)
Divides an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator /(
    Vector4 vec,
    float scale
)

Parameters

vec
Type: DualityVector4
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Division Overload
Duality Namespace


Vector4.Equality Operator

Vector4Equality Operator
Compares two instances for equality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    Vector4 left,
    Vector4 right
)

Parameters

left
Type: DualityVector4
The first instance.
right
Type: DualityVector4
The second instance.

Return Value

Type: Boolean
True, if left equals right; false otherwise.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Inequality Operator

Vector4Inequality Operator
Compares two instances for inequality.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    Vector4 left,
    Vector4 right
)

Parameters

left
Type: DualityVector4
The first instance.
right
Type: DualityVector4
The second instance.

Return Value

Type: Boolean
True, if left does not equa lright; false otherwise.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Multiply Operator

Vector4Multiply Operator
Overload List
Name | Description
Multiply(Single, Vector4) | Multiplies an instance by a scalar.
Multiply(Vector4, Vector4) | Scales an instance by a vector.
Multiply(Vector4, Single) | Multiplies an instance by a scalar.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Multiply Operator (Single, Vector4)

Vector4Multiply Operator (Single, Vector4)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator *(
    float scale,
    Vector4 vec
)

Parameters

scale
Type: SystemSingle
The scalar.
vec
Type: DualityVector4
The instance.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Multiply Overload
Duality Namespace


Vector4.Multiply Operator (Vector4, Vector4)

Vector4Multiply Operator (Vector4, Vector4)
Scales an instance by a vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator *(
    Vector4 vec,
    Vector4 scale
)

Parameters

vec
Type: DualityVector4
The instance.
scale
Type: DualityVector4
The scalar.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Multiply Overload
Duality Namespace


Vector4.Multiply Operator (Vector4, Single)

Vector4Multiply Operator (Vector4, Single)
Multiplies an instance by a scalar.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator *(
    Vector4 vec,
    float scale
)

Parameters

vec
Type: DualityVector4
The instance.
scale
Type: SystemSingle
The scalar.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Multiply Overload
Duality Namespace


Vector4.Subtraction Operator

Vector4Subtraction Operator
Subtracts two instances.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator -(
    Vector4 left,
    Vector4 right
)

Parameters

left
Type: DualityVector4
The first instance.
right
Type: DualityVector4
The second instance.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.UnaryNegation Operator

Vector4UnaryNegation Operator
Negates an instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static Vector4 operator -(
    Vector4 vec
)

Parameters

vec
Type: DualityVector4
The instance.

Return Value

Type: Vector4
The result of the calculation.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4 Properties

Vector4 Properties

The Vector4 type exposes the following members.

Properties
 | Name | Description
Public property | Item | Gets or sets the value at the index of the Vector.
Public property | Length | Gets the length (magnitude) of the vector.
Public property | LengthSquared | Gets the square of the vector length (magnitude).
Public property | Normalized | Returns a normalized version of this vector.
Public property | Xy | Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
Public property | Xyz | Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
Top
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Item Property

Vector4Item Property
Gets or sets the value at the index of the Vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float this[
    int index
] { get; set; }

Parameters

index
Type: SystemInt32

Property Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Length Property

Vector4Length Property
Gets the length (magnitude) of the vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float Length { get; }

Property Value

Type: Single
See Also

Reference

Vector4 Structure
Duality Namespace
Vector4LengthSquared


Vector4.LengthSquared Property

Vector4LengthSquared Property
Gets the square of the vector length (magnitude).

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float LengthSquared { get; }

Property Value

Type: Single
Remarks
This property avoids the costly square root operation required by the Length property. This makes it more suitable for comparisons.
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Normalized Property

Vector4Normalized Property
Returns a normalized version of this vector.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector4 Normalized { get; }

Property Value

Type: Vector4
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Xy Property

Vector4Xy Property
Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector2 Xy { get; set; }

Property Value

Type: Vector2
See Also

Reference

Vector4 Structure
Duality Namespace


Vector4.Xyz Property

Vector4Xyz Property
Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.

Namespace: Duality
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public Vector3 Xyz { get; set; }

Property Value

Type: Vector3
See Also

Reference

Vector4 Structure
Duality Namespace


VisualLog Class

VisualLog Class
A VisualLog provides functionality to log spatial and other visual information conveniently, which is displayed in real-time. Each VisualLog can be set up differently and corresponds to a distinct visual layer. All submitted calls are guaranteed to be displayed visually within the same frame they were submitted in.
Inheritance Hierarchy
SystemObject
DualityVisualLog

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLog

The VisualLog type exposes the following members.

Methods
 | Name | Description
Public method | DrawT | Draws the specified log entry. Use this method for custom VisualLogEntry class implementations.
Public method | DrawCircle(Single, Single, Single) | Draws a circle in screen space.
Public method | DrawCircle(Single, Single, Single, Single) | Draws a circle in world space.
Public method | DrawConnection(Single, Single, Single, Single) | Draws a connection between two screen space points.
Public method | DrawConnection(Single, Single, Single, Single, Single) | Draws a connection between two world space points. Both points need to be on the same Z plane.
Public method | DrawPoint(Single, Single) | Draws a point in screen space.
Public method | DrawPoint(Single, Single, Single) | Draws a point in world space. A point has no physical size and is displayed in the same size regardless of perspective settings or distance to the Camera.
Public method | DrawPolygon(Single, Single, Vector2) | Draws a convex polygon in screen space.
Public method | DrawPolygon(Single, Single, Single, Vector2) | Draws a convex polygon in world space.
Public method | DrawText(Single, Single, String) | Draws a text in screen space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Public method | DrawText(Single, Single, Single, String) | Draws a text in world space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Public method | DrawVector(Single, Single, Single, Single) | Draws a vector in screen space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
Public method | DrawVector(Single, Single, Single, Single, Single) | Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
 | Get | [GET] Creates or retrieves a named log. Once a log has been created, it will remain available until explicitly removed.
Top
Properties
 | Name | Description
 | All | [GET] Enumerates all currently existing logs.
Public property | BaseColor | [GET / SET] The logs base color, which is used for coloring all the displayed log entries.
 | Default | [GET] Returns the default log, which can be used for quick output hacks and miscellaneous data. To set up a distinct layer for specific kinds of data, use a different log.
Public property | Entries | [GET] Enumerates all log entries that have been added to this log and are currently active.
Public property | Name | [GET] The VisualLog's name
Public property | VisibilityGroup | [GET / SET] Similar to a renderers visibility group, this property can be used to make the log visible to only certain Cameras.
Public property | Visible | [GET / SET] Whether or not this log will be displayed. It's basically an on / off switch.
Top
See Also

Reference

Duality Namespace


VisualLog Methods

VisualLog Methods

The VisualLog type exposes the following members.

Methods
 | Name | Description
Public method | DrawT | Draws the specified log entry. Use this method for custom VisualLogEntry class implementations.
Public method | DrawCircle(Single, Single, Single) | Draws a circle in screen space.
Public method | DrawCircle(Single, Single, Single, Single) | Draws a circle in world space.
Public method | DrawConnection(Single, Single, Single, Single) | Draws a connection between two screen space points.
Public method | DrawConnection(Single, Single, Single, Single, Single) | Draws a connection between two world space points. Both points need to be on the same Z plane.
Public method | DrawPoint(Single, Single) | Draws a point in screen space.
Public method | DrawPoint(Single, Single, Single) | Draws a point in world space. A point has no physical size and is displayed in the same size regardless of perspective settings or distance to the Camera.
Public method | DrawPolygon(Single, Single, Vector2) | Draws a convex polygon in screen space.
Public method | DrawPolygon(Single, Single, Single, Vector2) | Draws a convex polygon in world space.
Public method | DrawText(Single, Single, String) | Draws a text in screen space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Public method | DrawText(Single, Single, Single, String) | Draws a text in world space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Public method | DrawVector(Single, Single, Single, Single) | Draws a vector in screen space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
Public method | DrawVector(Single, Single, Single, Single, Single) | Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
 | Get | [GET] Creates or retrieves a named log. Once a log has been created, it will remain available until explicitly removed.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.Draw(T) Method

VisualLogDrawT Method
Draws the specified log entry. Use this method for custom VisualLogEntry class implementations.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Draw<T>(
    T entry
)
where T : VisualLogEntry

Parameters

entry
Type: T

Type Parameters

T

Return Value

Type:
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawCircle Method

VisualLogDrawCircle Method
Overload List
 | Name | Description
Public method | DrawCircle(Single, Single, Single) | Draws a circle in screen space.
Public method | DrawCircle(Single, Single, Single, Single) | Draws a circle in world space.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawCircle Method (Single, Single, Single)

VisualLogDrawCircle Method (Single, Single, Single)
Draws a circle in screen space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogCircleEntry DrawCircle(
    float screenX,
    float screenY,
    float radius
)

Parameters

screenX
Type: SystemSingle
screenY
Type: SystemSingle
radius
Type: SystemSingle

Return Value

Type: VisualLogCircleEntry
See Also

Reference

VisualLog Class
DrawCircle Overload
Duality Namespace


VisualLog.DrawCircle Method (Single, Single, Single, Single)

VisualLogDrawCircle Method (Single, Single, Single, Single)
Draws a circle in world space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogCircleEntry DrawCircle(
    float worldX,
    float worldY,
    float worldZ,
    float radius
)

Parameters

worldX
Type: SystemSingle
worldY
Type: SystemSingle
worldZ
Type: SystemSingle
radius
Type: SystemSingle

Return Value

Type: VisualLogCircleEntry
See Also

Reference

VisualLog Class
DrawCircle Overload
Duality Namespace


VisualLog.DrawConnection Method

VisualLogDrawConnection Method
Overload List
 | Name | Description
Public method | DrawConnection(Single, Single, Single, Single) | Draws a connection between two screen space points.
Public method | DrawConnection(Single, Single, Single, Single, Single) | Draws a connection between two world space points. Both points need to be on the same Z plane.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawConnection Method (Single, Single, Single, Single)

VisualLogDrawConnection Method (Single, Single, Single, Single)
Draws a connection between two screen space points.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogConnectionEntry DrawConnection(
    float screenX1,
    float screenY1,
    float screenX2,
    float screenY2
)

Parameters

screenX1
Type: SystemSingle
screenY1
Type: SystemSingle
screenX2
Type: SystemSingle
screenY2
Type: SystemSingle

Return Value

Type: VisualLogConnectionEntry
See Also

Reference

VisualLog Class
DrawConnection Overload
Duality Namespace


VisualLog.DrawConnection Method (Single, Single, Single, Single, Single)

VisualLogDrawConnection Method (Single, Single, Single, Single, Single)
Draws a connection between two world space points. Both points need to be on the same Z plane.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogConnectionEntry DrawConnection(
    float worldX1,
    float worldY1,
    float worldZ,
    float worldX2,
    float worldY2
)

Parameters

worldX1
Type: SystemSingle
worldY1
Type: SystemSingle
worldZ
Type: SystemSingle
worldX2
Type: SystemSingle
worldY2
Type: SystemSingle

Return Value

Type: VisualLogConnectionEntry
See Also

Reference

VisualLog Class
DrawConnection Overload
Duality Namespace


VisualLog.DrawPoint Method

VisualLogDrawPoint Method
Overload List
 | Name | Description
Public method | DrawPoint(Single, Single) | Draws a point in screen space.
Public method | DrawPoint(Single, Single, Single) | Draws a point in world space. A point has no physical size and is displayed in the same size regardless of perspective settings or distance to the Camera.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawPoint Method (Single, Single)

VisualLogDrawPoint Method (Single, Single)
Draws a point in screen space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPointEntry DrawPoint(
    float screenX,
    float screenY
)

Parameters

screenX
Type: SystemSingle
screenY
Type: SystemSingle

Return Value

Type: VisualLogPointEntry
See Also

Reference

VisualLog Class
DrawPoint Overload
Duality Namespace


VisualLog.DrawPoint Method (Single, Single, Single)

VisualLogDrawPoint Method (Single, Single, Single)
Draws a point in world space. A point has no physical size and is displayed in the same size regardless of perspective settings or distance to the Camera.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPointEntry DrawPoint(
    float worldX,
    float worldY,
    float worldZ
)

Parameters

worldX
Type: SystemSingle
worldY
Type: SystemSingle
worldZ
Type: SystemSingle

Return Value

Type: VisualLogPointEntry
See Also

Reference

VisualLog Class
DrawPoint Overload
Duality Namespace


VisualLog.DrawPolygon Method

VisualLogDrawPolygon Method
Overload List
 | Name | Description
Public method | DrawPolygon(Single, Single, Vector2) | Draws a convex polygon in screen space.
Public method | DrawPolygon(Single, Single, Single, Vector2) | Draws a convex polygon in world space.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawPolygon Method (Single, Single, Vector2[])

VisualLogDrawPolygon Method (Single, Single, Vector2)
Draws a convex polygon in screen space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPolygonEntry DrawPolygon(
    float screenX,
    float screenY,
    Vector2[] polygon
)

Parameters

screenX
Type: SystemSingle
screenY
Type: SystemSingle
polygon
Type: DualityVector2

Return Value

Type: VisualLogPolygonEntry
See Also

Reference

VisualLog Class
DrawPolygon Overload
Duality Namespace


VisualLog.DrawPolygon Method (Single, Single, Single, Vector2[])

VisualLogDrawPolygon Method (Single, Single, Single, Vector2)
Draws a convex polygon in world space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPolygonEntry DrawPolygon(
    float worldX,
    float worldY,
    float worldZ,
    Vector2[] polygon
)

Parameters

worldX
Type: SystemSingle
worldY
Type: SystemSingle
worldZ
Type: SystemSingle
polygon
Type: DualityVector2

Return Value

Type: VisualLogPolygonEntry
See Also

Reference

VisualLog Class
DrawPolygon Overload
Duality Namespace


VisualLog.DrawText Method

VisualLogDrawText Method
Overload List
 | Name | Description
Public method | DrawText(Single, Single, String) | Draws a text in screen space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Public method | DrawText(Single, Single, Single, String) | Draws a text in world space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawText Method (Single, Single, String)

VisualLogDrawText Method (Single, Single, String)
Draws a text in screen space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogTextEntry DrawText(
    float screenX,
    float screenY,
    string text
)

Parameters

screenX
Type: SystemSingle
screenY
Type: SystemSingle
text
Type: SystemString

Return Value

Type: VisualLogTextEntry
See Also

Reference

VisualLog Class
DrawText Overload
Duality Namespace


VisualLog.DrawText Method (Single, Single, Single, String)

VisualLogDrawText Method (Single, Single, Single, String)
Draws a text in world space. Unlike other log entries, texts retain a constant rotation and size. Only the point of their origin is transformed regularly.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogTextEntry DrawText(
    float worldX,
    float worldY,
    float worldZ,
    string text
)

Parameters

worldX
Type: SystemSingle
worldY
Type: SystemSingle
worldZ
Type: SystemSingle
text
Type: SystemString

Return Value

Type: VisualLogTextEntry
See Also

Reference

VisualLog Class
DrawText Overload
Duality Namespace


VisualLog.DrawVector Method

VisualLogDrawVector Method
Overload List
 | Name | Description
Public method | DrawVector(Single, Single, Single, Single) | Draws a vector in screen space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
Public method | DrawVector(Single, Single, Single, Single, Single) | Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.DrawVector Method (Single, Single, Single, Single)

VisualLogDrawVector Method (Single, Single, Single, Single)
Draws a vector in screen space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogVectorEntry DrawVector(
    float screenX,
    float screenY,
    float vectorX,
    float vectorY
)

Parameters

screenX
Type: SystemSingle
The vectors screen origin.
screenY
Type: SystemSingle
The vectors screen origin.
vectorX
Type: SystemSingle
The vector to display.
vectorY
Type: SystemSingle
The vector to display.

Return Value

Type: VisualLogVectorEntry
See Also

Reference

VisualLog Class
DrawVector Overload
Duality Namespace


VisualLog.DrawVector Method (Single, Single, Single, Single, Single)

VisualLogDrawVector Method (Single, Single, Single, Single, Single)
Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. It is useful for displaying velocities or directions.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogVectorEntry DrawVector(
    float worldX,
    float worldY,
    float worldZ,
    float vectorX,
    float vectorY
)

Parameters

worldX
Type: SystemSingle
The vectors world origin.
worldY
Type: SystemSingle
The vectors world origin.
worldZ
Type: SystemSingle
The vectors world origin.
vectorX
Type: SystemSingle
The vector to display.
vectorY
Type: SystemSingle
The vector to display.

Return Value

Type: VisualLogVectorEntry
See Also

Reference

VisualLog Class
DrawVector Overload
Duality Namespace


VisualLog.Get Method

VisualLogGet Method
[GET] Creates or retrieves a named log. Once a log has been created, it will remain available until explicitly removed.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLog Get(
    string logName
)

Parameters

logName
Type: SystemString

Return Value

Type: VisualLog
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog Properties

VisualLog Properties

The VisualLog type exposes the following members.

Properties
 | Name | Description
 | All | [GET] Enumerates all currently existing logs.
Public property | BaseColor | [GET / SET] The logs base color, which is used for coloring all the displayed log entries.
 | Default | [GET] Returns the default log, which can be used for quick output hacks and miscellaneous data. To set up a distinct layer for specific kinds of data, use a different log.
Public property | Entries | [GET] Enumerates all log entries that have been added to this log and are currently active.
Public property | Name | [GET] The VisualLog's name
Public property | VisibilityGroup | [GET / SET] Similar to a renderers visibility group, this property can be used to make the log visible to only certain Cameras.
Public property | Visible | [GET / SET] Whether or not this log will be displayed. It's basically an on / off switch.
Top
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.All Property

VisualLogAll Property
[GET] Enumerates all currently existing logs.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<VisualLog> All { get; }

Property Value

Type: IEnumerable VisualLog
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.BaseColor Property

VisualLogBaseColor Property
[GET / SET] The logs base color, which is used for coloring all the displayed log entries.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba BaseColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.Default Property

VisualLogDefault Property
[GET] Returns the default log, which can be used for quick output hacks and miscellaneous data. To set up a distinct layer for specific kinds of data, use a different log.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VisualLog Default { get; }

Property Value

Type: VisualLog
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.Entries Property

VisualLogEntries Property
[GET] Enumerates all log entries that have been added to this log and are currently active.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<VisualLogEntry> Entries { get; }

Property Value

Type: IEnumerable VisualLogEntry
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.Name Property

VisualLogName Property
[GET] The VisualLog's name

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.VisibilityGroup Property

VisualLogVisibilityGroup Property
[GET / SET] Similar to a renderers visibility group, this property can be used to make the log visible to only certain Cameras.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisibilityFlag VisibilityGroup { get; set; }

Property Value

Type: VisibilityFlag
See Also

Reference

VisualLog Class
Duality Namespace


VisualLog.Visible Property

VisualLogVisible Property
[GET / SET] Whether or not this log will be displayed. It's basically an on / off switch.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Visible { get; set; }

Property Value

Type: Boolean
See Also

Reference

VisualLog Class
Duality Namespace


VisualLogAnchor Enumeration

VisualLogAnchor Enumeration
Describes the reference point by which a VisualLogEntry will be transformed.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum VisualLogAnchor
Members
Member name | Value | Description
Screen | 0 | All coordinates and sizes are interpreted as screen space values.
World | 1 | All coordinates and sizes are interpreted as world space values.
Object | 2 | All coordinates and sizes are interpreted as object space values. A reference object needs to be specified for this option to be functional.
See Also

Reference

Duality Namespace


VisualLogCircleEntry Class

VisualLogCircleEntry Class
Represents a circular area in space in the context of visual logging.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogCircleEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogCircleEntry : VisualLogEntry

The VisualLogCircleEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogCircleEntry | Initializes a new instance of the VisualLogCircleEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Public Extension Method | Segment | Instead of a full circle, only a certain angular segment of the circle will be displayed. (Defined by ExtMethodsVisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the circle area will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | MaxAngle | [GET / SET] The maximum angle of the displayed circle area segment.
Public property | MinAngle | [GET / SET] The minimum angle of the displayed circle area segment.
Public property | Pos | [GET / SET] The circular areas center location.
Public property | Radius | [GET / SET] The circles radius.
Top
See Also

Reference

Duality Namespace


VisualLogCircleEntry Constructor

VisualLogCircleEntry Constructor
Initializes a new instance of the VisualLogCircleEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogCircleEntry()
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry Methods

VisualLogCircleEntry Methods

The VisualLogCircleEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Public Extension Method | Segment | Instead of a full circle, only a certain angular segment of the circle will be displayed. (Defined by ExtMethodsVisualLogEntry.)
Top
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.Draw Method

VisualLogCircleEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogCircleEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogCircleEntry Class
Draw Overload
Duality Namespace


VisualLogCircleEntry Properties

VisualLogCircleEntry Properties

The VisualLogCircleEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the circle area will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | MaxAngle | [GET / SET] The maximum angle of the displayed circle area segment.
Public property | MinAngle | [GET / SET] The minimum angle of the displayed circle area segment.
Public property | Pos | [GET / SET] The circular areas center location.
Public property | Radius | [GET / SET] The circles radius.
Top
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.InvariantScale Property

VisualLogCircleEntryInvariantScale Property
[GET / SET] Whether or not the circle area will be displayed at a constant size regardless of perspective scale.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool InvariantScale { get; set; }

Property Value

Type: Boolean
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.MaxAngle Property

VisualLogCircleEntryMaxAngle Property
[GET / SET] The maximum angle of the displayed circle area segment.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxAngle { get; set; }

Property Value

Type: Single
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.MinAngle Property

VisualLogCircleEntryMinAngle Property
[GET / SET] The minimum angle of the displayed circle area segment.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinAngle { get; set; }

Property Value

Type: Single
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.Pos Property

VisualLogCircleEntryPos Property
[GET / SET] The circular areas center location.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogCircleEntry.Radius Property

VisualLogCircleEntryRadius Property
[GET / SET] The circles radius.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Radius { get; set; }

Property Value

Type: Single
See Also

Reference

VisualLogCircleEntry Class
Duality Namespace


VisualLogConnectionEntry Class

VisualLogConnectionEntry Class
Represents a connection between two points in space in the context of visual logging.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogConnectionEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogConnectionEntry : VisualLogEntry

The VisualLogConnectionEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogConnectionEntry | Initializes a new instance of the VisualLogConnectionEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | PosA | [GET / SET] The first points spatial location.
Public property | PosB | [GET / SET] The second points spatial location.
Top
See Also

Reference

Duality Namespace


VisualLogConnectionEntry Constructor

VisualLogConnectionEntry Constructor
Initializes a new instance of the VisualLogConnectionEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogConnectionEntry()
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogConnectionEntry Methods

VisualLogConnectionEntry Methods

The VisualLogConnectionEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogConnectionEntry.Draw Method

VisualLogConnectionEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogConnectionEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogConnectionEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogConnectionEntry Class
Draw Overload
Duality Namespace


VisualLogConnectionEntry Properties

VisualLogConnectionEntry Properties

The VisualLogConnectionEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | PosA | [GET / SET] The first points spatial location.
Public property | PosB | [GET / SET] The second points spatial location.
Top
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogConnectionEntry.PosA Property

VisualLogConnectionEntryPosA Property
[GET / SET] The first points spatial location.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 PosA { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogConnectionEntry.PosB Property

VisualLogConnectionEntryPosB Property
[GET / SET] The second points spatial location.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 PosB { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogConnectionEntry Class
Duality Namespace


VisualLogEntry Class

VisualLogEntry Class
Represents an entry of a VisualLog, which will be generated by calling one of the available drawing methods on one of the available logs.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
More...

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class VisualLogEntry

The VisualLogEntry type exposes the following members.

Constructors
 | Name | Description
Protected method | VisualLogEntry | Initializes a new instance of the VisualLogEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas.
Public method | Draw(Canvas, Vector3, Single, Single) | Draws the entry to the specified Canvas. Its parameters provide information about the log entries anchor and should be interpreted as parent transform.
Public method | Remove | Removes this log entry by killing it immediately.
Public method | Update | Updates the entry. This method is automatically called by the system.
Top
Fields
Name | Description
DefaultOutlineWidth | Default width of the outline of a log entries visual representation.
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes.
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored.
Public property | Color | [GET / SET] The log entries individual color.
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately.
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame.
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color.
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets".
Top
See Also

Reference

Duality Namespace
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogCircleEntry
DualityVisualLogConnectionEntry
DualityVisualLogPointEntry
DualityVisualLogPolygonEntry
DualityVisualLogTextEntry
DualityVisualLogVectorEntry


VisualLogEntry Constructor

VisualLogEntry Constructor
Initializes a new instance of the VisualLogEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected VisualLogEntry()
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry Fields

VisualLogEntry Fields

The VisualLogEntry type exposes the following members.

Fields
Name | Description
DefaultOutlineWidth | Default width of the outline of a log entries visual representation.
Top
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.DefaultOutlineWidth Field

VisualLogEntryDefaultOutlineWidth Field
Default width of the outline of a log entries visual representation.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected const float DefaultOutlineWidth

Field Value

Type: Single
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry Methods

VisualLogEntry Methods

The VisualLogEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas.
Public method | Draw(Canvas, Vector3, Single, Single) | Draws the entry to the specified Canvas. Its parameters provide information about the log entries anchor and should be interpreted as parent transform.
Public method | Remove | Removes this log entry by killing it immediately.
Public method | Update | Updates the entry. This method is automatically called by the system.
Top
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Draw Method

VisualLogEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas.
Public method | Draw(Canvas, Vector3, Single, Single) | Draws the entry to the specified Canvas. Its parameters provide information about the log entries anchor and should be interpreted as parent transform.
Top
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Draw Method (Canvas)

VisualLogEntryDraw Method (Canvas)
Draws the entry to the specified Canvas.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Draw(
    Canvas target
)

Parameters

target
Type: Duality.DrawingCanvas
See Also

Reference

VisualLogEntry Class
Draw Overload
Duality Namespace


VisualLogEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogEntryDraw Method (Canvas, Vector3, Single, Single)
Draws the entry to the specified Canvas. Its parameters provide information about the log entries anchor and should be interpreted as parent transform.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
The anchors base position.
baseRotation
Type: SystemSingle
The anchors base rotation.
baseScale
Type: SystemSingle
The anchors base scale.
See Also

Reference

VisualLogEntry Class
Draw Overload
Duality Namespace


VisualLogEntry.Remove Method

VisualLogEntryRemove Method
Removes this log entry by killing it immediately.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Remove()
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Update Method

VisualLogEntryUpdate Method
Updates the entry. This method is automatically called by the system.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void Update()
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry Properties

VisualLogEntry Properties

The VisualLogEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes.
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored.
Public property | Color | [GET / SET] The log entries individual color.
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately.
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame.
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color.
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets".
Top
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Anchor Property

VisualLogEntryAnchor Property
[GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogAnchor Anchor { get; set; }

Property Value

Type: VisualLogAnchor
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.AnchorObj Property

VisualLogEntryAnchorObj Property
[GET / SET] The GameObject to which this log entry is anchored.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject AnchorObj { get; set; }

Property Value

Type: GameObject
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Color Property

VisualLogEntryColor Property
[GET / SET] The log entries individual color.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba Color { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.DepthOffset Property

VisualLogEntryDepthOffset Property
[GET / SET] The depth offset that is applied when rendering this visual log entry.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float DepthOffset { get; set; }

Property Value

Type: Single
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.IsAlive Property

VisualLogEntryIsAlive Property
[GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAlive { get; }

Property Value

Type: Boolean
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.Lifetime Property

VisualLogEntryLifetime Property
[GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Lifetime { get; set; }

Property Value

Type: Single
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.LifetimeAsAlpha Property

VisualLogEntryLifetimeAsAlpha Property
[GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool LifetimeAsAlpha { get; set; }

Property Value

Type: Boolean
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogEntry.LifetimeRatio Property

VisualLogEntryLifetimeRatio Property
[GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets".

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual float LifetimeRatio { get; }

Property Value

Type: Single
See Also

Reference

VisualLogEntry Class
Duality Namespace


VisualLogPointEntry Class

VisualLogPointEntry Class
Represents a point in space in the context of visual logging. Points do not have a physical size and thus are displayed invariantly to parent or perspective scale.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogPointEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogPointEntry : VisualLogEntry

The VisualLogPointEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogPointEntry | Initializes a new instance of the VisualLogPointEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The points spatial location.
Top
See Also

Reference

Duality Namespace


VisualLogPointEntry Constructor

VisualLogPointEntry Constructor
Initializes a new instance of the VisualLogPointEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPointEntry()
See Also

Reference

VisualLogPointEntry Class
Duality Namespace


VisualLogPointEntry Methods

VisualLogPointEntry Methods

The VisualLogPointEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
See Also

Reference

VisualLogPointEntry Class
Duality Namespace


VisualLogPointEntry.Draw Method

VisualLogPointEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogPointEntry Class
Duality Namespace


VisualLogPointEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogPointEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogPointEntry Class
Draw Overload
Duality Namespace


VisualLogPointEntry Properties

VisualLogPointEntry Properties

The VisualLogPointEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The points spatial location.
Top
See Also

Reference

VisualLogPointEntry Class
Duality Namespace


VisualLogPointEntry.Pos Property

VisualLogPointEntryPos Property
[GET / SET] The points spatial location.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogPointEntry Class
Duality Namespace


VisualLogPolygonEntry Class

VisualLogPolygonEntry Class
Represents a polygon in the context of visual logging.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogPolygonEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogPolygonEntry : VisualLogEntry

The VisualLogPolygonEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogPolygonEntry | Initializes a new instance of the VisualLogPolygonEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the polygon area will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The polygons origin in space.
Public property | Vertices | [GET / SET] The vertices that form the displayed polygon.
Top
See Also

Reference

Duality Namespace


VisualLogPolygonEntry Constructor

VisualLogPolygonEntry Constructor
Initializes a new instance of the VisualLogPolygonEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogPolygonEntry()
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry Methods

VisualLogPolygonEntry Methods

The VisualLogPolygonEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Top
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry.Draw Method

VisualLogPolygonEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogPolygonEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogPolygonEntry Class
Draw Overload
Duality Namespace


VisualLogPolygonEntry Properties

VisualLogPolygonEntry Properties

The VisualLogPolygonEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the polygon area will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The polygons origin in space.
Public property | Vertices | [GET / SET] The vertices that form the displayed polygon.
Top
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry.InvariantScale Property

VisualLogPolygonEntryInvariantScale Property
[GET / SET] Whether or not the polygon area will be displayed at a constant size regardless of perspective scale.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool InvariantScale { get; set; }

Property Value

Type: Boolean
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry.Pos Property

VisualLogPolygonEntryPos Property
[GET / SET] The polygons origin in space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogPolygonEntry.Vertices Property

VisualLogPolygonEntryVertices Property
[GET / SET] The vertices that form the displayed polygon.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2[] Vertices { get; set; }

Property Value

Type: Vector2
See Also

Reference

VisualLogPolygonEntry Class
Duality Namespace


VisualLogTextEntry Class

VisualLogTextEntry Class
Represents a textual description of a certain point in space in the context of visual logging.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogTextEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogTextEntry : VisualLogEntry

The VisualLogTextEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogTextEntry | Initializes a new instance of the VisualLogTextEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Align | Aligns the text of this log entry as specified. (Defined by ExtMethodsVisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | BlockAlignment | [GET / SET] The texts (multiline block) spatial alignment.
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The point in space that is described by this text.
Public property | Text | [GET / SET] The text that will be displayed. Newline characters will be parsed correctly and be correctly displayed as line breaks.
Public property | TextLines | [GET] The displayed text, broken up into distinct lines. Do not modify - use Text instead.
Top
See Also

Reference

Duality Namespace


VisualLogTextEntry Constructor

VisualLogTextEntry Constructor
Initializes a new instance of the VisualLogTextEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogTextEntry()
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry Methods

VisualLogTextEntry Methods

The VisualLogTextEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Align | Aligns the text of this log entry as specified. (Defined by ExtMethodsVisualLogEntry.)
Top
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.Draw Method

VisualLogTextEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogTextEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogTextEntry Class
Draw Overload
Duality Namespace


VisualLogTextEntry Properties

VisualLogTextEntry Properties

The VisualLogTextEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | BlockAlignment | [GET / SET] The texts (multiline block) spatial alignment.
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Pos | [GET / SET] The point in space that is described by this text.
Public property | Text | [GET / SET] The text that will be displayed. Newline characters will be parsed correctly and be correctly displayed as line breaks.
Public property | TextLines | [GET] The displayed text, broken up into distinct lines. Do not modify - use Text instead.
Top
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.BlockAlignment Property

VisualLogTextEntryBlockAlignment Property
[GET / SET] The texts (multiline block) spatial alignment.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Alignment BlockAlignment { get; set; }

Property Value

Type: Alignment
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.Pos Property

VisualLogTextEntryPos Property
[GET / SET] The point in space that is described by this text.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.Text Property

VisualLogTextEntryText Property
[GET / SET] The text that will be displayed. Newline characters will be parsed correctly and be correctly displayed as line breaks.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Text { get; set; }

Property Value

Type: String
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogTextEntry.TextLines Property

VisualLogTextEntryTextLines Property
[GET] The displayed text, broken up into distinct lines. Do not modify - use Text instead.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string[] TextLines { get; }

Property Value

Type: String
See Also

Reference

VisualLogTextEntry Class
Duality Namespace


VisualLogVectorEntry Class

VisualLogVectorEntry Class
Represents a vector based on a certain space origin in the context of visual logging.
Inheritance Hierarchy
SystemObject
DualityVisualLogEntry
DualityVisualLogVectorEntry

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class VisualLogVectorEntry : VisualLogEntry

The VisualLogVectorEntry type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogVectorEntry | Initializes a new instance of the VisualLogVectorEntry class
Top
Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Top
Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the vector will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Origin | [GET / SET] The vectors origin in space.
Public property | Vector | [GET / SET] The vector to display.
Top
See Also

Reference

Duality Namespace


VisualLogVectorEntry Constructor

VisualLogVectorEntry Constructor
Initializes a new instance of the VisualLogVectorEntry class

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogVectorEntry()
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry Methods

VisualLogVectorEntry Methods

The VisualLogVectorEntry type exposes the following members.

Methods
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Public method | Remove | Removes this log entry by killing it immediately. (Inherited from VisualLogEntry.)
Public method | Update | Updates the entry. This method is automatically called by the system. (Inherited from VisualLogEntry.)
Top
Extension Methods
 | Name | Description
Public Extension Method | DontScale | Prohibits scale changes due to perspective transformation. (Defined by ExtMethodsVisualLogEntry.)
Top
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry.Draw Method

VisualLogVectorEntryDraw Method
Overload List
 | Name | Description
Public method | Draw(Canvas) | Draws the entry to the specified Canvas. (Inherited from VisualLogEntry.)
Public method | Draw(Canvas, Vector3, Single, Single) | (Overrides VisualLogEntryDraw(Canvas, Vector3, Single, Single).)
Top
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry.Draw Method (Canvas, Vector3, Single, Single)

VisualLogVectorEntryDraw Method (Canvas, Vector3, Single, Single)

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    Canvas target,
    Vector3 basePos,
    float baseRotation,
    float baseScale
)

Parameters

target
Type: Duality.DrawingCanvas
basePos
Type: DualityVector3
baseRotation
Type: SystemSingle
baseScale
Type: SystemSingle
See Also

Reference

VisualLogVectorEntry Class
Draw Overload
Duality Namespace


VisualLogVectorEntry Properties

VisualLogVectorEntry Properties

The VisualLogVectorEntry type exposes the following members.

Properties
 | Name | Description
Public property | Anchor | [GET / SET] The anchor which is used for interpreting this log entries coordinates and sizes. (Inherited from VisualLogEntry.)
Public property | AnchorObj | [GET / SET] The GameObject to which this log entry is anchored. (Inherited from VisualLogEntry.)
Public property | Color | [GET / SET] The log entries individual color. (Inherited from VisualLogEntry.)
Public property | DepthOffset | [GET / SET] The depth offset that is applied when rendering this visual log entry. (Inherited from VisualLogEntry.)
Public property | InvariantScale | [GET / SET] Whether or not the vector will be displayed at a constant size regardless of perspective scale.
Public property | IsAlive | [GET] Returns whether this log entry is to be considered alive. Dead entries will be removed immediately. (Inherited from VisualLogEntry.)
Public property | Lifetime | [GET / SET] The remaining lifetime of this log entry in milliseconds. If not specified otherwise, a log entry is only displayed for a single frame. (Inherited from VisualLogEntry.)
Public property | LifetimeAsAlpha | [GET / SET] Whether the lifetime of this entry should be used as alpha-value of the specified color. (Inherited from VisualLogEntry.)
Public property | LifetimeRatio | [GET] The relative amount of available lifetime this log entry has. 0.0f means "totally dead", 1.0f means "as alive as it gets". (Inherited from VisualLogEntry.)
Public property | Origin | [GET / SET] The vectors origin in space.
Public property | Vector | [GET / SET] The vector to display.
Top
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry.InvariantScale Property

VisualLogVectorEntryInvariantScale Property
[GET / SET] Whether or not the vector will be displayed at a constant size regardless of perspective scale.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool InvariantScale { get; set; }

Property Value

Type: Boolean
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry.Origin Property

VisualLogVectorEntryOrigin Property
[GET / SET] The vectors origin in space.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Origin { get; set; }

Property Value

Type: Vector3
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


VisualLogVectorEntry.Vector Property

VisualLogVectorEntryVector Property
[GET / SET] The vector to display.

Namespace: Duality
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Vector { get; set; }

Property Value

Type: Vector2
See Also

Reference

VisualLogVectorEntry Class
Duality Namespace


Duality.Audio Namespace

Duality.Audio Namespace
Classes
 | Class | Description
Public class | OggVorbis |
Public class | SoundDevice | Provides functionality to play and manage sound in Duality.
Public class | SoundInstance | An instance of a Sound.
Public class | VorbisStreamHandle |
Structures
 | Structure | Description
Public structure | PcmData |
Enumerations
 | Enumeration | Description
Public enumeration | AudioDataElementType | Describes the type of an audio samples individual elements (L, R, ...)
Public enumeration | AudioDataLayout | Describes the layout and purpose of audio data values.
Public enumeration | SoundType | Describes the type of a sound. This is used for determining which specific volume settings affect each sound.


AudioDataElementType Enumeration

AudioDataElementType Enumeration
Describes the type of an audio samples individual elements (L, R, ...)

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum AudioDataElementType
Members
Member name | Value | Description
Byte | 0 |
Short | 1 |
See Also

Reference

Duality.Audio Namespace


AudioDataLayout Enumeration

AudioDataLayout Enumeration
Describes the layout and purpose of audio data values.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum AudioDataLayout
Members
Member name | Value | Description
Mono | 0 |
LeftRight | 1 |
See Also

Reference

Duality.Audio Namespace


OggVorbis Class

OggVorbis Class
Inheritance Hierarchy
SystemObject
Duality.AudioOggVorbis

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class OggVorbis

The OggVorbis type exposes the following members.

Methods
Name | Description
BeginStreamFromMemory |
EndStream |
IsStreamValid |
LoadChunkFromMemory |
LoadFromMemory |
ReadAll |
StreamChunk |
Top
See Also

Reference

Duality.Audio Namespace


OggVorbis Methods

OggVorbis Methods

The OggVorbis type exposes the following members.

Methods
Name | Description
BeginStreamFromMemory |
EndStream |
IsStreamValid |
LoadChunkFromMemory |
LoadFromMemory |
ReadAll |
StreamChunk |
Top
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.BeginStreamFromMemory Method

OggVorbisBeginStreamFromMemory Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void BeginStreamFromMemory(
    byte[] memory,
    out VorbisStreamHandle handle
)

Parameters

memory
Type: SystemByte
handle
Type: Duality.AudioVorbisStreamHandle
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.EndStream Method

OggVorbisEndStream Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void EndStream(
    ref VorbisStreamHandle handle
)

Parameters

handle
Type: Duality.AudioVorbisStreamHandle
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.IsStreamValid Method

OggVorbisIsStreamValid Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsStreamValid(
    VorbisStreamHandle handle
)

Parameters

handle
Type: Duality.AudioVorbisStreamHandle

Return Value

Type: Boolean
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.LoadChunkFromMemory Method

OggVorbisLoadChunkFromMemory Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static PcmData LoadChunkFromMemory(
    byte[] memory,
    uint sampleCount
)

Parameters

memory
Type: SystemByte
sampleCount
Type: SystemUInt32

Return Value

Type: PcmData
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.LoadFromMemory Method

OggVorbisLoadFromMemory Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static PcmData LoadFromMemory(
    byte[] memory
)

Parameters

memory
Type: SystemByte

Return Value

Type: PcmData
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.ReadAll Method

OggVorbisReadAll Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool ReadAll(
    VorbisStreamHandle handle,
    out PcmData pcm
)

Parameters

handle
Type: Duality.AudioVorbisStreamHandle
pcm
Type: Duality.AudioPcmData

Return Value

Type: Boolean
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


OggVorbis.StreamChunk Method

OggVorbisStreamChunk Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool StreamChunk(
    VorbisStreamHandle handle,
    out PcmData pcm,
    uint bufferSize = 16384
)

Parameters

handle
Type: Duality.AudioVorbisStreamHandle
pcm
Type: Duality.AudioPcmData
bufferSize (Optional)
Type: SystemUInt32

Return Value

Type: Boolean
See Also

Reference

OggVorbis Class
Duality.Audio Namespace


PcmData Structure

PcmData Structure

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct PcmData

The PcmData type exposes the following members.

Fields
 | Name | Description
Public field | ChannelCount |
Public field | Data |
Public field | DataLength |
Public field | SampleRate |
 | SizeOfDataElement |
Top
See Also

Reference

Duality.Audio Namespace


PcmData Fields

PcmData Fields

The PcmData type exposes the following members.

Fields
 | Name | Description
Public field | ChannelCount |
Public field | Data |
Public field | DataLength |
Public field | SampleRate |
 | SizeOfDataElement |
Top
See Also

Reference

PcmData Structure
Duality.Audio Namespace


PcmData.ChannelCount Field

PcmDataChannelCount Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ChannelCount

Field Value

Type: Int32
See Also

Reference

PcmData Structure
Duality.Audio Namespace


PcmData.Data Field

PcmDataData Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public short[] Data

Field Value

Type: Int16
See Also

Reference

PcmData Structure
Duality.Audio Namespace


PcmData.DataLength Field

PcmDataDataLength Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int DataLength

Field Value

Type: Int32
See Also

Reference

PcmData Structure
Duality.Audio Namespace


PcmData.SampleRate Field

PcmDataSampleRate Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int SampleRate

Field Value

Type: Int32
See Also

Reference

PcmData Structure
Duality.Audio Namespace


PcmData.SizeOfDataElement Field

PcmDataSizeOfDataElement Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int SizeOfDataElement

Field Value

Type: Int32
See Also

Reference

PcmData Structure
Duality.Audio Namespace


SoundDevice Class

SoundDevice Class
Provides functionality to play and manage sound in Duality.
Inheritance Hierarchy
SystemObject
Duality.AudioSoundDevice

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SoundDevice : IDisposable

The SoundDevice type exposes the following members.

Constructors
 | Name | Description
Public method | SoundDevice | Initializes a new instance of the SoundDevice class
Top
Methods
 | Name | Description
Public method | Dispose | Releases all resources used by the SoundDevice
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetNumPlaying | Determines the number of playing instances of a specific Sound.
Public method | PlaySound | Plays a sound.
Public method | PlaySound3D(ContentRefSound, GameObject) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, Vector3) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, GameObject, Vector3) | Plays a sound 3d "in space".
Public method | StopAll | Stops all currently playing sounds.
Top
Properties
 | Name | Description
Public property | DefaultMaxDist | [GET] Returns a Sounds default maximum distance.
Public property | DefaultMinDist | [GET] Returns a Sounds default minimum distance.
Public property | Listener | [GET / SET] The current listener object. This is automatically set to an available SoundListener.
Public property | ListenerAngle | [GET] The current listeners rotation / angle in radians.
Public property | ListenerPos | [GET] The current listeners position.
Public property | ListenerVel | [GET] The current listeners velocity.
Public property | MaxOpenALSources | [GET] Returns the maximum number of available OpenAL sound sources.
Public property | Mute | [GET / SET] Whether all Duality audio is currently muted completely.
Public property | NumAvailable | [GET] Returns the number of currently available OpenAL sound sources.
Public property | NumPlaying2D | [GET] Returns the number of currently playing 2d sounds.
Public property | NumPlaying3D | [GET] Returns the number of currently playing 3d sounds.
Public property | Playing | [GET] Enumerates all currently playing SoundInstances.
Top
See Also

Reference

Duality.Audio Namespace


SoundDevice Constructor

SoundDevice Constructor
Initializes a new instance of the SoundDevice class

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundDevice()
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice Methods

SoundDevice Methods

The SoundDevice type exposes the following members.

Methods
 | Name | Description
Public method | Dispose |
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetNumPlaying | Determines the number of playing instances of a specific Sound.
Public method | PlaySound | Plays a sound.
Public method | PlaySound3D(ContentRefSound, GameObject) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, Vector3) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, GameObject, Vector3) | Plays a sound 3d "in space".
Public method | StopAll | Stops all currently playing sounds.
Top
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.Dispose Method

SoundDeviceDispose Method
Releases all resources used by the SoundDevice

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.Finalize Method

SoundDeviceFinalize Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.GetNumPlaying Method

SoundDeviceGetNumPlaying Method
Determines the number of playing instances of a specific Sound.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetNumPlaying(
    ContentRef<Sound> snd
)

Parameters

snd
Type: DualityContentRef Sound
The Sound of which to determine the number of playing instances.

Return Value

Type: Int32
The number of the specified Sounds playing instances.
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.PlaySound Method

SoundDevicePlaySound Method
Plays a sound.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundInstance PlaySound(
    ContentRef<Sound> snd
)

Parameters

snd
Type: DualityContentRef Sound
The Sound to play.

Return Value

Type: SoundInstance
A new SoundInstance representing the currentply playing sound.
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.PlaySound3D Method

SoundDevicePlaySound3D Method
Overload List
 | Name | Description
Public method | PlaySound3D(ContentRefSound, GameObject) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, Vector3) | Plays a sound 3d "in space".
Public method | PlaySound3D(ContentRefSound, GameObject, Vector3) | Plays a sound 3d "in space".
Top
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.PlaySound3D Method (ContentRef(Sound), GameObject)

SoundDevicePlaySound3D Method (ContentRefSound, GameObject)
Plays a sound 3d "in space".

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundInstance PlaySound3D(
    ContentRef<Sound> snd,
    GameObject attachTo
)

Parameters

snd
Type: DualityContentRef Sound
The Sound to play.
attachTo
Type: DualityGameObject
The GameObject to which the sound will be attached.

Return Value

Type: SoundInstance
A new SoundInstance representing the currentply playing sound.
See Also

Reference

SoundDevice Class
PlaySound3D Overload
Duality.Audio Namespace


SoundDevice.PlaySound3D Method (ContentRef(Sound), Vector3)

SoundDevicePlaySound3D Method (ContentRefSound, Vector3)
Plays a sound 3d "in space".

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundInstance PlaySound3D(
    ContentRef<Sound> snd,
    Vector3 pos
)

Parameters

snd
Type: DualityContentRef Sound
The Sound to play.
pos
Type: DualityVector3
The position of the sound in space.

Return Value

Type: SoundInstance
A new SoundInstance representing the currentply playing sound.
See Also

Reference

SoundDevice Class
PlaySound3D Overload
Duality.Audio Namespace


SoundDevice.PlaySound3D Method (ContentRef(Sound), GameObject, Vector3)

SoundDevicePlaySound3D Method (ContentRefSound, GameObject, Vector3)
Plays a sound 3d "in space".

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundInstance PlaySound3D(
    ContentRef<Sound> snd,
    GameObject attachTo,
    Vector3 relativePos
)

Parameters

snd
Type: DualityContentRef Sound
The Sound to play.
attachTo
Type: DualityGameObject
The GameObject to which the sound will be attached.
relativePos
Type: DualityVector3
The position of the sound relative to the GameObject.

Return Value

Type: SoundInstance
A new SoundInstance representing the currentply playing sound.
See Also

Reference

SoundDevice Class
PlaySound3D Overload
Duality.Audio Namespace


SoundDevice.StopAll Method

SoundDeviceStopAll Method
Stops all currently playing sounds.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void StopAll()
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice Properties

SoundDevice Properties

The SoundDevice type exposes the following members.

Properties
 | Name | Description
Public property | DefaultMaxDist | [GET] Returns a Sounds default maximum distance.
Public property | DefaultMinDist | [GET] Returns a Sounds default minimum distance.
Public property | Listener | [GET / SET] The current listener object. This is automatically set to an available SoundListener.
Public property | ListenerAngle | [GET] The current listeners rotation / angle in radians.
Public property | ListenerPos | [GET] The current listeners position.
Public property | ListenerVel | [GET] The current listeners velocity.
Public property | MaxOpenALSources | [GET] Returns the maximum number of available OpenAL sound sources.
Public property | Mute | [GET / SET] Whether all Duality audio is currently muted completely.
Public property | NumAvailable | [GET] Returns the number of currently available OpenAL sound sources.
Public property | NumPlaying2D | [GET] Returns the number of currently playing 2d sounds.
Public property | NumPlaying3D | [GET] Returns the number of currently playing 3d sounds.
Public property | Playing | [GET] Enumerates all currently playing SoundInstances.
Top
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.DefaultMaxDist Property

SoundDeviceDefaultMaxDist Property
[GET] Returns a Sounds default maximum distance.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float DefaultMaxDist { get; }

Property Value

Type: Single
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.DefaultMinDist Property

SoundDeviceDefaultMinDist Property
[GET] Returns a Sounds default minimum distance.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float DefaultMinDist { get; }

Property Value

Type: Single
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.Listener Property

SoundDeviceListener Property
[GET / SET] The current listener object. This is automatically set to an available SoundListener.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Listener { get; set; }

Property Value

Type: GameObject
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.ListenerAngle Property

SoundDeviceListenerAngle Property
[GET] The current listeners rotation / angle in radians.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ListenerAngle { get; }

Property Value

Type: Single
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.ListenerPos Property

SoundDeviceListenerPos Property
[GET] The current listeners position.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 ListenerPos { get; }

Property Value

Type: Vector3
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.ListenerVel Property

SoundDeviceListenerVel Property
[GET] The current listeners velocity.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 ListenerVel { get; }

Property Value

Type: Vector3
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.MaxOpenALSources Property

SoundDeviceMaxOpenALSources Property
[GET] Returns the maximum number of available OpenAL sound sources.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MaxOpenALSources { get; }

Property Value

Type: Int32
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.Mute Property

SoundDeviceMute Property
[GET / SET] Whether all Duality audio is currently muted completely.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Mute { get; set; }

Property Value

Type: Boolean
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.NumAvailable Property

SoundDeviceNumAvailable Property
[GET] Returns the number of currently available OpenAL sound sources.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int NumAvailable { get; }

Property Value

Type: Int32
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.NumPlaying2D Property

SoundDeviceNumPlaying2D Property
[GET] Returns the number of currently playing 2d sounds.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int NumPlaying2D { get; }

Property Value

Type: Int32
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.NumPlaying3D Property

SoundDeviceNumPlaying3D Property
[GET] Returns the number of currently playing 3d sounds.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int NumPlaying3D { get; }

Property Value

Type: Int32
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundDevice.Playing Property

SoundDevicePlaying Property
[GET] Enumerates all currently playing SoundInstances.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<SoundInstance> Playing { get; }

Property Value

Type: IEnumerable SoundInstance
See Also

Reference

SoundDevice Class
Duality.Audio Namespace


SoundInstance Class

SoundInstance Class
An instance of a Sound.
Inheritance Hierarchy
SystemObject
Duality.AudioSoundInstance

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SoundInstance : IDisposable,
    IAudioStreamProvider

The SoundInstance type exposes the following members.

Methods
 | Name | Description
Public method | BeginFadeIn | Resets the sounds current fade value to zero and starts to fade it in.
Public method | Dispose | Releases all resources used by the SoundInstance
Public method | FadeIn | Fades the sound in from its current fade value. Note that SoundInstances are initialized with a fade value of 1.0f because they aren't faded in generally. To achieve a regular "fade in" effect, you should use BeginFadeIn(Single).
Public method | FadeOut | Fades out the sound.
Public method | FadeTo | Fades the sound to a specific target value.
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | Stop | Stops the sound immediately.
Public method | StopFade | Halts the current fading, keepinf the current fade value as fade target.
Public method | Update | Updates the SoundInstance
Top
Fields
Name | Description
PriorityStealLoopedThreshold |
PriorityStealThreshold |
Top
Properties
 | Name | Description
Public property | AttachedTo | [GET] The GameObject that this SoundInstance is attached to.
Public property | AudioData | [GET] A reference to the AudioData that is being played by this SoundInstance.
Public property | CurrentFade | [GET] When fading in or out, this value represents the current fading state.
Public property | Disposed | [GET] Whether the SoundInstance has been disposed. Disposed objects are not to be used anymore and should be treated as null or similar.
Public property | FadeTarget | [GET] The target value for the current fade. Usually 0.0f or 1.0f for fadint out / in.
Public property | Is3D | [GET] Whether the sound is played 3d, "in space" or not.
Public property | Looped | [GET / SET] Whether the sound is played in a loop.
Public property | Lowpass | [GET / SET] The sounds local lowpass value. Lower values cut off more frequencies.
Public property | Native | [GET] The currently used native audio source, as provided by the Duality backend. Don't use this unless you know exactly what you're doing.
Public property | Panning | [GET / SET] The sounds local stereo panning, ranging from -1.0f (left) to 1.0f (right). Only available for 2D sounds.
Public property | Paused | [GET / SET] Whether the sound is currently paused.
Public property | Pitch | [GET / SET] The sounds local pitch factor.
Public property | PlayTime | [GET] The time in seconds that this SoundInstance has been playing its sound. This value is affected by the sounds Pitch.
Public property | Pos | [GET / SET] The sounds position in space. If it is attached to a GameObject, this value is considered relative to it.
Public property | Priority | [GET] The SoundInstances priority.
Public property | Sound | [GET] A reference to the Sound that is being played by this SoundInstance.
Public property | Vel | [GET / SET] The sounds velocity. If it is attached to a GameObject, this value is considered relative to it.
Public property | Volume | [GET / SET] The sounds local volume factor.
Top
See Also

Reference

Duality.Audio Namespace


SoundInstance Fields

SoundInstance Fields

The SoundInstance type exposes the following members.

Fields
Name | Description
PriorityStealLoopedThreshold |
PriorityStealThreshold |
Top
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.PriorityStealLoopedThreshold Field

SoundInstancePriorityStealLoopedThreshold Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int PriorityStealLoopedThreshold

Field Value

Type: Int32
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.PriorityStealThreshold Field

SoundInstancePriorityStealThreshold Field

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int PriorityStealThreshold

Field Value

Type: Int32
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance Methods

SoundInstance Methods

The SoundInstance type exposes the following members.

Methods
 | Name | Description
Public method | BeginFadeIn | Resets the sounds current fade value to zero and starts to fade it in.
Public method | Dispose |
Public method | FadeIn | Fades the sound in from its current fade value. Note that SoundInstances are initialized with a fade value of 1.0f because they aren't faded in generally. To achieve a regular "fade in" effect, you should use BeginFadeIn(Single).
Public method | FadeOut | Fades out the sound.
Public method | FadeTo | Fades the sound to a specific target value.
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | Stop | Stops the sound immediately.
Public method | StopFade | Halts the current fading, keepinf the current fade value as fade target.
Public method | Update | Updates the SoundInstance
Top
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.BeginFadeIn Method

SoundInstanceBeginFadeIn Method
Resets the sounds current fade value to zero and starts to fade it in.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void BeginFadeIn(
    float timeSeconds
)

Parameters

timeSeconds
Type: SystemSingle
The time in seconds the fading will take.
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Dispose Method

SoundInstanceDispose Method
Releases all resources used by the SoundInstance

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.FadeIn Method

SoundInstanceFadeIn Method
Fades the sound in from its current fade value. Note that SoundInstances are initialized with a fade value of 1.0f because they aren't faded in generally. To achieve a regular "fade in" effect, you should use BeginFadeIn(Single).

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FadeIn(
    float timeSeconds
)

Parameters

timeSeconds
Type: SystemSingle
The time in seconds the fading will take.
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.FadeOut Method

SoundInstanceFadeOut Method
Fades out the sound.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FadeOut(
    float timeSeconds
)

Parameters

timeSeconds
Type: SystemSingle
The time in seconds the fading will take.
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.FadeTo Method

SoundInstanceFadeTo Method
Fades the sound to a specific target value.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FadeTo(
    float target,
    float timeSeconds
)

Parameters

target
Type: SystemSingle
The target value to fade to.
timeSeconds
Type: SystemSingle
The time in seconds the fading will take.
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Finalize Method

SoundInstanceFinalize Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Stop Method

SoundInstanceStop Method
Stops the sound immediately.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Stop()
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.StopFade Method

SoundInstanceStopFade Method
Halts the current fading, keepinf the current fade value as fade target.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void StopFade()
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Update Method

SoundInstanceUpdate Method
Updates the SoundInstance

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Update()
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance Properties

SoundInstance Properties

The SoundInstance type exposes the following members.

Properties
 | Name | Description
Public property | AttachedTo | [GET] The GameObject that this SoundInstance is attached to.
Public property | AudioData | [GET] A reference to the AudioData that is being played by this SoundInstance.
Public property | CurrentFade | [GET] When fading in or out, this value represents the current fading state.
Public property | Disposed | [GET] Whether the SoundInstance has been disposed. Disposed objects are not to be used anymore and should be treated as null or similar.
Public property | FadeTarget | [GET] The target value for the current fade. Usually 0.0f or 1.0f for fadint out / in.
Public property | Is3D | [GET] Whether the sound is played 3d, "in space" or not.
Public property | Looped | [GET / SET] Whether the sound is played in a loop.
Public property | Lowpass | [GET / SET] The sounds local lowpass value. Lower values cut off more frequencies.
Public property | Native | [GET] The currently used native audio source, as provided by the Duality backend. Don't use this unless you know exactly what you're doing.
Public property | Panning | [GET / SET] The sounds local stereo panning, ranging from -1.0f (left) to 1.0f (right). Only available for 2D sounds.
Public property | Paused | [GET / SET] Whether the sound is currently paused.
Public property | Pitch | [GET / SET] The sounds local pitch factor.
Public property | PlayTime | [GET] The time in seconds that this SoundInstance has been playing its sound. This value is affected by the sounds Pitch.
Public property | Pos | [GET / SET] The sounds position in space. If it is attached to a GameObject, this value is considered relative to it.
Public property | Priority | [GET] The SoundInstances priority.
Public property | Sound | [GET] A reference to the Sound that is being played by this SoundInstance.
Public property | Vel | [GET / SET] The sounds velocity. If it is attached to a GameObject, this value is considered relative to it.
Public property | Volume | [GET / SET] The sounds local volume factor.
Top
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.AttachedTo Property

SoundInstanceAttachedTo Property
[GET] The GameObject that this SoundInstance is attached to.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject AttachedTo { get; }

Property Value

Type: GameObject
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.AudioData Property

SoundInstanceAudioData Property
[GET] A reference to the AudioData that is being played by this SoundInstance.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<AudioData> AudioData { get; }

Property Value

Type: ContentRef AudioData
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.CurrentFade Property

SoundInstanceCurrentFade Property
[GET] When fading in or out, this value represents the current fading state.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float CurrentFade { get; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Disposed Property

SoundInstanceDisposed Property
[GET] Whether the SoundInstance has been disposed. Disposed objects are not to be used anymore and should be treated as null or similar.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.FadeTarget Property

SoundInstanceFadeTarget Property
[GET] The target value for the current fade. Usually 0.0f or 1.0f for fadint out / in.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FadeTarget { get; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Is3D Property

SoundInstanceIs3D Property
[GET] Whether the sound is played 3d, "in space" or not.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Is3D { get; }

Property Value

Type: Boolean
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Looped Property

SoundInstanceLooped Property
[GET / SET] Whether the sound is played in a loop.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Looped { get; set; }

Property Value

Type: Boolean
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Lowpass Property

SoundInstanceLowpass Property
[GET / SET] The sounds local lowpass value. Lower values cut off more frequencies.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Lowpass { get; set; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Native Property

SoundInstanceNative Property
[GET] The currently used native audio source, as provided by the Duality backend. Don't use this unless you know exactly what you're doing.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeAudioSource Native { get; }

Property Value

Type: INativeAudioSource
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Panning Property

SoundInstancePanning Property
[GET / SET] The sounds local stereo panning, ranging from -1.0f (left) to 1.0f (right). Only available for 2D sounds.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Panning { get; set; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Paused Property

SoundInstancePaused Property
[GET / SET] Whether the sound is currently paused.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Paused { get; set; }

Property Value

Type: Boolean
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Pitch Property

SoundInstancePitch Property
[GET / SET] The sounds local pitch factor.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Pitch { get; set; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.PlayTime Property

SoundInstancePlayTime Property
[GET] The time in seconds that this SoundInstance has been playing its sound. This value is affected by the sounds Pitch.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float PlayTime { get; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Pos Property

SoundInstancePos Property
[GET / SET] The sounds position in space. If it is attached to a GameObject, this value is considered relative to it.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Priority Property

SoundInstancePriority Property
[GET] The SoundInstances priority.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Priority { get; }

Property Value

Type: Int32
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Sound Property

SoundInstanceSound Property
[GET] A reference to the Sound that is being played by this SoundInstance.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Sound> Sound { get; }

Property Value

Type: ContentRef Sound
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Vel Property

SoundInstanceVel Property
[GET / SET] The sounds velocity. If it is attached to a GameObject, this value is considered relative to it.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Vel { get; set; }

Property Value

Type: Vector3
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundInstance.Volume Property

SoundInstanceVolume Property
[GET / SET] The sounds local volume factor.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Volume { get; set; }

Property Value

Type: Single
See Also

Reference

SoundInstance Class
Duality.Audio Namespace


SoundType Enumeration

SoundType Enumeration
Describes the type of a sound. This is used for determining which specific volume settings affect each sound.

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum SoundType
Members
Member name | Value | Description
World | 0 | A sound effect taking place in the game world.
UserInterface | 1 | A User Interface sound effect.
Music | 2 | A sound that is considered being game music.
Speech | 3 | A sound that is considered being spoken language.
See Also

Reference

Duality.Audio Namespace


VorbisStreamHandle Class

VorbisStreamHandle Class
Inheritance Hierarchy
SystemObject
Duality.AudioVorbisStreamHandle

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class VorbisStreamHandle : IDisposable

The VorbisStreamHandle type exposes the following members.

Methods
 | Name | Description
Public method | Dispose | Releases all resources used by the VorbisStreamHandle
Protected method | Finalize | (Overrides ObjectFinalize.)
Top
Properties
 | Name | Description
Public property | Disposed |
Top
See Also

Reference

Duality.Audio Namespace


VorbisStreamHandle Methods

VorbisStreamHandle Methods

The VorbisStreamHandle type exposes the following members.

Methods
 | Name | Description
Public method | Dispose |
Protected method | Finalize | (Overrides ObjectFinalize.)
Top
See Also

Reference

VorbisStreamHandle Class
Duality.Audio Namespace


VorbisStreamHandle.Dispose Method

VorbisStreamHandleDispose Method
Releases all resources used by the VorbisStreamHandle

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

VorbisStreamHandle Class
Duality.Audio Namespace


VorbisStreamHandle.Finalize Method

VorbisStreamHandleFinalize Method

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

VorbisStreamHandle Class
Duality.Audio Namespace


VorbisStreamHandle Properties

VorbisStreamHandle Properties

The VorbisStreamHandle type exposes the following members.

Properties
 | Name | Description
Public property | Disposed |
Top
See Also

Reference

VorbisStreamHandle Class
Duality.Audio Namespace


VorbisStreamHandle.Disposed Property

VorbisStreamHandleDisposed Property

Namespace: Duality.Audio
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

VorbisStreamHandle Class
Duality.Audio Namespace


Duality.Backend Namespace

Duality.Backend Namespace
Classes
 | Class | Description
Public class | AssemblyLoadedEventArgs | Event arguments for notifications about the runtime loading an Assembly.
Public class | AssemblyResolveEventArgs | Event arguments for handling an Assembly resolve operation.
Public class | BackendException |
Public class | RenderOptions |
Public class | RenderStats |
Public class | WindowOptions |
Structures
 | Structure | Description
Public structure | AudioSourceState |
Interfaces
 | Interface | Description
Public interface | IAudioBackend |
Public interface | IAudioStreamProvider |
Public interface | IDualityBackend |
Public interface | IGraphicsBackend |
Public interface | INativeAudioBuffer |
Public interface | INativeAudioSource |
Public interface | INativeRenderTarget |
Public interface | INativeShaderPart |
Public interface | INativeShaderProgram |
Public interface | INativeTexture |
Public interface | INativeWindow |
Public interface | IPluginLoader | Specifies an API for enumerating and loading plugin Assemblies.
Public interface | ISystemBackend |


AssemblyLoadedEventArgs Class

AssemblyLoadedEventArgs Class
Event arguments for notifications about the runtime loading an Assembly.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.BackendAssemblyLoadedEventArgs

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AssemblyLoadedEventArgs : EventArgs

The AssemblyLoadedEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | AssemblyLoadedEventArgs | Initializes a new instance of the AssemblyLoadedEventArgs class
Top
Properties
 | Name | Description
Public property | LoadedAssembly | [GET] The Assembly that was loaded by the runtime.
Top
See Also

Reference

Duality.Backend Namespace


AssemblyLoadedEventArgs Constructor

AssemblyLoadedEventArgs Constructor
Initializes a new instance of the AssemblyLoadedEventArgs class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AssemblyLoadedEventArgs(
    Assembly assembly
)

Parameters

assembly
Type: System.ReflectionAssembly
See Also

Reference

AssemblyLoadedEventArgs Class
Duality.Backend Namespace


AssemblyLoadedEventArgs Properties

AssemblyLoadedEventArgs Properties

The AssemblyLoadedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | LoadedAssembly | [GET] The Assembly that was loaded by the runtime.
Top
See Also

Reference

AssemblyLoadedEventArgs Class
Duality.Backend Namespace


AssemblyLoadedEventArgs.LoadedAssembly Property

AssemblyLoadedEventArgsLoadedAssembly Property
[GET] The Assembly that was loaded by the runtime.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Assembly LoadedAssembly { get; }

Property Value

Type: Assembly
See Also

Reference

AssemblyLoadedEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs Class

AssemblyResolveEventArgs Class
Event arguments for handling an Assembly resolve operation.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.BackendAssemblyResolveEventArgs

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AssemblyResolveEventArgs : EventArgs

The AssemblyResolveEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | AssemblyResolveEventArgs | Initializes a new instance of the AssemblyResolveEventArgs class
Top
Methods
 | Name | Description
Public method | Resolve | Resolves the queried AssemblyName with the specified Assembly.
Top
Properties
 | Name | Description
Public property | AssemblyName | [GET] The short name of the Assembly to resolve.
Public property | FullAssemblyName | [GET] The full name of the Assembly to resolve.
Public property | IsResolved | [GET] Whether the Assembly was resolved successfully.
Public property | ResolvedAssembly | [GET] The Assembly to which the name was resolved.
Top
See Also

Reference

Duality.Backend Namespace


AssemblyResolveEventArgs Constructor

AssemblyResolveEventArgs Constructor
Initializes a new instance of the AssemblyResolveEventArgs class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AssemblyResolveEventArgs(
    string fullAssemblyName
)

Parameters

fullAssemblyName
Type: SystemString
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs Methods

AssemblyResolveEventArgs Methods

The AssemblyResolveEventArgs type exposes the following members.

Methods
 | Name | Description
Public method | Resolve | Resolves the queried AssemblyName with the specified Assembly.
Top
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs.Resolve Method

AssemblyResolveEventArgsResolve Method
Resolves the queried AssemblyName with the specified Assembly.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Resolve(
    Assembly assembly
)

Parameters

assembly
Type: System.ReflectionAssembly
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs Properties

AssemblyResolveEventArgs Properties

The AssemblyResolveEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | AssemblyName | [GET] The short name of the Assembly to resolve.
Public property | FullAssemblyName | [GET] The full name of the Assembly to resolve.
Public property | IsResolved | [GET] Whether the Assembly was resolved successfully.
Public property | ResolvedAssembly | [GET] The Assembly to which the name was resolved.
Top
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs.AssemblyName Property

AssemblyResolveEventArgsAssemblyName Property
[GET] The short name of the Assembly to resolve.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string AssemblyName { get; }

Property Value

Type: String
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs.FullAssemblyName Property

AssemblyResolveEventArgsFullAssemblyName Property
[GET] The full name of the Assembly to resolve.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FullAssemblyName { get; }

Property Value

Type: String
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs.IsResolved Property

AssemblyResolveEventArgsIsResolved Property
[GET] Whether the Assembly was resolved successfully.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsResolved { get; }

Property Value

Type: Boolean
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AssemblyResolveEventArgs.ResolvedAssembly Property

AssemblyResolveEventArgsResolvedAssembly Property
[GET] The Assembly to which the name was resolved.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Assembly ResolvedAssembly { get; }

Property Value

Type: Assembly
See Also

Reference

AssemblyResolveEventArgs Class
Duality.Backend Namespace


AudioSourceState Structure

AudioSourceState Structure

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct AudioSourceState

The AudioSourceState type exposes the following members.

Fields
 | Name | Description
 | Default |
Public field | Looped |
Public field | Lowpass |
Public field | MaxDistance |
Public field | MinDistance |
Public field | Paused |
Public field | Pitch |
Public field | Position |
Public field | RelativeToListener |
Public field | Velocity |
Public field | Volume |
Top
See Also

Reference

Duality.Backend Namespace


AudioSourceState Fields

AudioSourceState Fields

The AudioSourceState type exposes the following members.

Fields
 | Name | Description
 | Default |
Public field | Looped |
Public field | Lowpass |
Public field | MaxDistance |
Public field | MinDistance |
Public field | Paused |
Public field | Pitch |
Public field | Position |
Public field | RelativeToListener |
Public field | Velocity |
Public field | Volume |
Top
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Default Field

AudioSourceStateDefault Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly AudioSourceState Default

Field Value

Type: AudioSourceState
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Looped Field

AudioSourceStateLooped Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Looped

Field Value

Type: Boolean
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Lowpass Field

AudioSourceStateLowpass Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Lowpass

Field Value

Type: Single
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.MaxDistance Field

AudioSourceStateMaxDistance Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxDistance

Field Value

Type: Single
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.MinDistance Field

AudioSourceStateMinDistance Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinDistance

Field Value

Type: Single
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Paused Field

AudioSourceStatePaused Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Paused

Field Value

Type: Boolean
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Pitch Field

AudioSourceStatePitch Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Pitch

Field Value

Type: Single
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Position Field

AudioSourceStatePosition Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Position

Field Value

Type: Vector3
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.RelativeToListener Field

AudioSourceStateRelativeToListener Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RelativeToListener

Field Value

Type: Boolean
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Velocity Field

AudioSourceStateVelocity Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Velocity

Field Value

Type: Vector3
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


AudioSourceState.Volume Field

AudioSourceStateVolume Field

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Volume

Field Value

Type: Single
See Also

Reference

AudioSourceState Structure
Duality.Backend Namespace


BackendException Class

BackendException Class
Inheritance Hierarchy
SystemObject
SystemException
Duality.BackendBackendException

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class BackendException : Exception
Constructors
 | Name | Description
Public method | BackendException(String) | Initializes a new instance of the BackendException class
Public method | BackendException(String, Exception) | Initializes a new instance of the BackendException class
Top
See Also

Reference

Duality.Backend Namespace


BackendException Constructor

BackendException Constructor
Overload List
 | Name | Description
Public method | BackendException(String) | Initializes a new instance of the BackendException class
Public method | BackendException(String, Exception) | Initializes a new instance of the BackendException class
Top
See Also

Reference

BackendException Class
Duality.Backend Namespace


BackendException Constructor (String)

BackendException Constructor (String)
Initializes a new instance of the BackendException class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BackendException(
    string message
)

Parameters

message
Type: SystemString
See Also

Reference

BackendException Class
BackendException Overload
Duality.Backend Namespace


BackendException Constructor (String, Exception)

BackendException Constructor (String, Exception)
Initializes a new instance of the BackendException class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BackendException(
    string message,
    Exception inner
)

Parameters

message
Type: SystemString
inner
Type: SystemException
See Also

Reference

BackendException Class
BackendException Overload
Duality.Backend Namespace


IAudioBackend Interface

IAudioBackend Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IAudioBackend : IDualityBackend

The IAudioBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | CreateBuffer |
Public method | CreateSource |
Public method | Init | (Inherited from IDualityBackend.)
Public method | Shutdown | (Inherited from IDualityBackend.)
Public method | UpdateListener |
Public method | UpdateWorldSettings |
Top
Properties
 | Name | Description
Public property | AvailableSources |
Public property | Id | (Inherited from IDualityBackend.)
Public property | MaxSourceCount |
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

Duality.Backend Namespace


IAudioBackend Methods

IAudioBackend Methods

The IAudioBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | CreateBuffer |
Public method | CreateSource |
Public method | Init | (Inherited from IDualityBackend.)
Public method | Shutdown | (Inherited from IDualityBackend.)
Public method | UpdateListener |
Public method | UpdateWorldSettings |
Top
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.CreateBuffer Method

IAudioBackendCreateBuffer Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeAudioBuffer CreateBuffer()

Return Value

Type: INativeAudioBuffer
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.CreateSource Method

IAudioBackendCreateSource Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeAudioSource CreateSource()

Return Value

Type: INativeAudioSource
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.UpdateListener Method

IAudioBackendUpdateListener Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void UpdateListener(
    Vector3 position,
    Vector3 velocity,
    float angle,
    bool mute
)

Parameters

position
Type: DualityVector3
velocity
Type: DualityVector3
angle
Type: SystemSingle
mute
Type: SystemBoolean
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.UpdateWorldSettings Method

IAudioBackendUpdateWorldSettings Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void UpdateWorldSettings(
    float speedOfSound,
    float dopplerFactor
)

Parameters

speedOfSound
Type: SystemSingle
dopplerFactor
Type: SystemSingle
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend Properties

IAudioBackend Properties

The IAudioBackend type exposes the following members.

Properties
 | Name | Description
Public property | AvailableSources |
Public property | Id | (Inherited from IDualityBackend.)
Public property | MaxSourceCount |
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.AvailableSources Property

IAudioBackendAvailableSources Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int AvailableSources { get; }

Property Value

Type: Int32
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioBackend.MaxSourceCount Property

IAudioBackendMaxSourceCount Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int MaxSourceCount { get; }

Property Value

Type: Int32
See Also

Reference

IAudioBackend Interface
Duality.Backend Namespace


IAudioStreamProvider Interface

IAudioStreamProvider Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IAudioStreamProvider

The IAudioStreamProvider type exposes the following members.

Methods
 | Name | Description
Public method | CloseStream |
Public method | OpenStream |
Public method | ReadStream |
Top
See Also

Reference

Duality.Backend Namespace


IAudioStreamProvider Methods

IAudioStreamProvider Methods

The IAudioStreamProvider type exposes the following members.

Methods
 | Name | Description
Public method | CloseStream |
Public method | OpenStream |
Public method | ReadStream |
Top
See Also

Reference

IAudioStreamProvider Interface
Duality.Backend Namespace


IAudioStreamProvider.CloseStream Method

IAudioStreamProviderCloseStream Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void CloseStream()
See Also

Reference

IAudioStreamProvider Interface
Duality.Backend Namespace


IAudioStreamProvider.OpenStream Method

IAudioStreamProviderOpenStream Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void OpenStream()
See Also

Reference

IAudioStreamProvider Interface
Duality.Backend Namespace


IAudioStreamProvider.ReadStream Method

IAudioStreamProviderReadStream Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool ReadStream(
    INativeAudioBuffer targetBuffer
)

Parameters

targetBuffer
Type: Duality.BackendINativeAudioBuffer

Return Value

Type: Boolean
See Also

Reference

IAudioStreamProvider Interface
Duality.Backend Namespace


IDualityBackend Interface

IDualityBackend Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IDualityBackend

The IDualityBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable |
Public method | Init |
Public method | Shutdown |
Top
Properties
 | Name | Description
Public property | Id |
Public property | Name |
Public property | Priority |
Top
See Also

Reference

Duality.Backend Namespace


IDualityBackend Methods

IDualityBackend Methods

The IDualityBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable |
Public method | Init |
Public method | Shutdown |
Top
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.CheckAvailable Method

IDualityBackendCheckAvailable Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool CheckAvailable()

Return Value

Type: Boolean
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.Init Method

IDualityBackendInit Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Init()
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.Shutdown Method

IDualityBackendShutdown Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Shutdown()
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend Properties

IDualityBackend Properties

The IDualityBackend type exposes the following members.

Properties
 | Name | Description
Public property | Id |
Public property | Name |
Public property | Priority |
Top
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.Id Property

IDualityBackendId Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Id { get; }

Property Value

Type: String
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.Name Property

IDualityBackendName Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Name { get; }

Property Value

Type: String
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IDualityBackend.Priority Property

IDualityBackendPriority Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Priority { get; }

Property Value

Type: Int32
See Also

Reference

IDualityBackend Interface
Duality.Backend Namespace


IGraphicsBackend Interface

IGraphicsBackend Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IGraphicsBackend : IDualityBackend

The IGraphicsBackend type exposes the following members.

Methods
 | Name | Description
Public method | BeginRendering |
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | CreateRenderTarget |
Public method | CreateShaderPart |
Public method | CreateShaderProgram |
Public method | CreateTexture |
Public method | CreateWindow |
Public method | EndRendering |
Public method | GetOutputPixelDataT | Retrieves the main rendering buffer's pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | Init | (Inherited from IDualityBackend.)
Public method | Render |
Public method | Shutdown | (Inherited from IDualityBackend.)
Top
Properties
 | Name | Description
Public property | AvailableScreenResolutions |
Public property | Id | (Inherited from IDualityBackend.)
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

Duality.Backend Namespace


IGraphicsBackend Methods

IGraphicsBackend Methods

The IGraphicsBackend type exposes the following members.

Methods
 | Name | Description
Public method | BeginRendering |
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | CreateRenderTarget |
Public method | CreateShaderPart |
Public method | CreateShaderProgram |
Public method | CreateTexture |
Public method | CreateWindow |
Public method | EndRendering |
Public method | GetOutputPixelDataT | Retrieves the main rendering buffer's pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | Init | (Inherited from IDualityBackend.)
Public method | Render |
Public method | Shutdown | (Inherited from IDualityBackend.)
Top
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.BeginRendering Method

IGraphicsBackendBeginRendering Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void BeginRendering(
    IDrawDevice device,
    RenderOptions options,
    RenderStats stats = null
)

Parameters

device
Type: Duality.DrawingIDrawDevice
options
Type: Duality.BackendRenderOptions
stats (Optional)
Type: Duality.BackendRenderStats
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.CreateRenderTarget Method

IGraphicsBackendCreateRenderTarget Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeRenderTarget CreateRenderTarget()

Return Value

Type: INativeRenderTarget
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.CreateShaderPart Method

IGraphicsBackendCreateShaderPart Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeShaderPart CreateShaderPart()

Return Value

Type: INativeShaderPart
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.CreateShaderProgram Method

IGraphicsBackendCreateShaderProgram Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeShaderProgram CreateShaderProgram()

Return Value

Type: INativeShaderProgram
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.CreateTexture Method

IGraphicsBackendCreateTexture Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeTexture CreateTexture()

Return Value

Type: INativeTexture
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.CreateWindow Method

IGraphicsBackendCreateWindow Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
INativeWindow CreateWindow(
    WindowOptions options
)

Parameters

options
Type: Duality.BackendWindowOptions

Return Value

Type: INativeWindow
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.EndRendering Method

IGraphicsBackendEndRendering Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void EndRendering()
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.GetOutputPixelData(T) Method

IGraphicsBackendGetOutputPixelDataT Method
Retrieves the main rendering buffer's pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void GetOutputPixelData<T>(
    T[] buffer,
    ColorDataLayout dataLayout,
    ColorDataElementType dataElementType,
    int x,
    int y,
    int width,
    int height
)
where T : struct, new()

Parameters

buffer
Type: T
dataLayout
Type: Duality.DrawingColorDataLayout
The desired color layout of the specified buffer.
dataElementType
Type: Duality.DrawingColorDataElementType
The desired color element type of the specified buffer.
x
Type: SystemInt32
The x position of the rectangular area to read.
y
Type: SystemInt32
The y position of the rectangular area to read.
width
Type: SystemInt32
The width of the rectangular area to read. Defaults to the rendering targets width.
height
Type: SystemInt32
The height of the rectangular area to read. Defaults to the rendering targets height.

Type Parameters

T
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.Render Method

IGraphicsBackendRender Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Render(
    IReadOnlyList batches
)

Parameters

batches
Type: System.Collections.GenericIReadOnlyListT
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend Properties

IGraphicsBackend Properties

The IGraphicsBackend type exposes the following members.

Properties
 | Name | Description
Public property | AvailableScreenResolutions |
Public property | Id | (Inherited from IDualityBackend.)
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


IGraphicsBackend.AvailableScreenResolutions Property

IGraphicsBackendAvailableScreenResolutions Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<ScreenResolution> AvailableScreenResolutions { get; }

Property Value

Type: IEnumerable ScreenResolution
See Also

Reference

IGraphicsBackend Interface
Duality.Backend Namespace


INativeAudioBuffer Interface

INativeAudioBuffer Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeAudioBuffer : IDisposable

The INativeAudioBuffer type exposes the following members.

Methods
 | Name | Description
Public method | LoadDataT |
Top
See Also

Reference

Duality.Backend Namespace


INativeAudioBuffer Methods

INativeAudioBuffer Methods

The INativeAudioBuffer type exposes the following members.

Methods
 | Name | Description
Public method | LoadDataT |
Top
See Also

Reference

INativeAudioBuffer Interface
Duality.Backend Namespace


INativeAudioBuffer.LoadData(T) Method

INativeAudioBufferLoadDataT Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void LoadData<T>(
    int sampleRate,
    T[] data,
    int dataLength,
    AudioDataLayout dataLayout,
    AudioDataElementType dataElementType
)
where T : struct, new()

Parameters

sampleRate
Type: SystemInt32
data
Type: T
dataLength
Type: SystemInt32
dataLayout
Type: Duality.AudioAudioDataLayout
dataElementType
Type: Duality.AudioAudioDataElementType

Type Parameters

T
See Also

Reference

INativeAudioBuffer Interface
Duality.Backend Namespace


INativeAudioSource Interface

INativeAudioSource Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeAudioSource : IDisposable

The INativeAudioSource type exposes the following members.

Methods
 | Name | Description
Public method | ApplyState | Updates the audio sources settings according to the specified data struct. It may modify the struct in order to reflect the actual settings, as supported by the backend.
Public method | Play(IAudioStreamProvider) | Plays the audio source using a streaming input.
Public method | Play(INativeAudioBuffer) | Plays the audio source using a single, static buffer.
Public method | Reset | Resets the entire state of the source, so it can be reused as if it was just created.
Public method | Stop | Stops the audio source, if it was playing.
Top
Properties
 | Name | Description
Public property | IsFinished | [GET] Whether the audio source is completely finished with playing audio.
Public property | IsInitial | [GET] Whether the audio source is in its initial state, i.e. ready to be used by a new sound instance.
Top
See Also

Reference

Duality.Backend Namespace


INativeAudioSource Methods

INativeAudioSource Methods

The INativeAudioSource type exposes the following members.

Methods
 | Name | Description
Public method | ApplyState | Updates the audio sources settings according to the specified data struct. It may modify the struct in order to reflect the actual settings, as supported by the backend.
Public method | Play(IAudioStreamProvider) | Plays the audio source using a streaming input.
Public method | Play(INativeAudioBuffer) | Plays the audio source using a single, static buffer.
Public method | Reset | Resets the entire state of the source, so it can be reused as if it was just created.
Public method | Stop | Stops the audio source, if it was playing.
Top
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.ApplyState Method

INativeAudioSourceApplyState Method
Updates the audio sources settings according to the specified data struct. It may modify the struct in order to reflect the actual settings, as supported by the backend.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void ApplyState(
    ref AudioSourceState state
)

Parameters

state
Type: Duality.BackendAudioSourceState
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.Play Method

INativeAudioSourcePlay Method
Overload List
 | Name | Description
Public method | Play(IAudioStreamProvider) | Plays the audio source using a streaming input.
Public method | Play(INativeAudioBuffer) | Plays the audio source using a single, static buffer.
Top
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.Play Method (IAudioStreamProvider)

INativeAudioSourcePlay Method (IAudioStreamProvider)
Plays the audio source using a streaming input.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Play(
    IAudioStreamProvider streamingProvider
)

Parameters

streamingProvider
Type: Duality.BackendIAudioStreamProvider
See Also

Reference

INativeAudioSource Interface
Play Overload
Duality.Backend Namespace


INativeAudioSource.Play Method (INativeAudioBuffer)

INativeAudioSourcePlay Method (INativeAudioBuffer)
Plays the audio source using a single, static buffer.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Play(
    INativeAudioBuffer buffer
)

Parameters

buffer
Type: Duality.BackendINativeAudioBuffer
See Also

Reference

INativeAudioSource Interface
Play Overload
Duality.Backend Namespace


INativeAudioSource.Reset Method

INativeAudioSourceReset Method
Resets the entire state of the source, so it can be reused as if it was just created.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Reset()
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.Stop Method

INativeAudioSourceStop Method
Stops the audio source, if it was playing.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Stop()
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource Properties

INativeAudioSource Properties

The INativeAudioSource type exposes the following members.

Properties
 | Name | Description
Public property | IsFinished | [GET] Whether the audio source is completely finished with playing audio.
Public property | IsInitial | [GET] Whether the audio source is in its initial state, i.e. ready to be used by a new sound instance.
Top
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.IsFinished Property

INativeAudioSourceIsFinished Property
[GET] Whether the audio source is completely finished with playing audio.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsFinished { get; }

Property Value

Type: Boolean
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeAudioSource.IsInitial Property

INativeAudioSourceIsInitial Property
[GET] Whether the audio source is in its initial state, i.e. ready to be used by a new sound instance.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsInitial { get; }

Property Value

Type: Boolean
See Also

Reference

INativeAudioSource Interface
Duality.Backend Namespace


INativeRenderTarget Interface

INativeRenderTarget Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeRenderTarget : IDisposable

The INativeRenderTarget type exposes the following members.

Methods
 | Name | Description
Public method | GetDataT | Retrieves the rendering targets pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | Setup |
Top
See Also

Reference

Duality.Backend Namespace


INativeRenderTarget Methods

INativeRenderTarget Methods

The INativeRenderTarget type exposes the following members.

Methods
 | Name | Description
Public method | GetDataT | Retrieves the rendering targets pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | Setup |
Top
See Also

Reference

INativeRenderTarget Interface
Duality.Backend Namespace


INativeRenderTarget.GetData(T) Method

INativeRenderTargetGetDataT Method
Retrieves the rendering targets pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void GetData<T>(
    T[] buffer,
    ColorDataLayout dataLayout,
    ColorDataElementType dataElementType,
    int targetIndex,
    int x,
    int y,
    int width,
    int height
)
where T : struct, new()

Parameters

buffer
Type: T
dataLayout
Type: Duality.DrawingColorDataLayout
The desired color layout of the specified buffer.
dataElementType
Type: Duality.DrawingColorDataElementType
The desired color element type of the specified buffer.
targetIndex
Type: SystemInt32
The target texture lists index to read from.
x
Type: SystemInt32
The x position of the rectangular area to read.
y
Type: SystemInt32
The y position of the rectangular area to read.
width
Type: SystemInt32
The width of the rectangular area to read. Defaults to the rendering targets width.
height
Type: SystemInt32
The height of the rectangular area to read. Defaults to the rendering targets height.

Type Parameters

T
See Also

Reference

INativeRenderTarget Interface
Duality.Backend Namespace


INativeRenderTarget.Setup Method

INativeRenderTargetSetup Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Setup(
    IReadOnlyList targets,
    void multisample
)

Parameters

targets
Type: System.Collections.GenericIReadOnlyListT
multisample
Type: SystemVoid
See Also

Reference

INativeRenderTarget Interface
Duality.Backend Namespace


INativeShaderPart Interface

INativeShaderPart Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeShaderPart : IDisposable

The INativeShaderPart type exposes the following members.

Methods
 | Name | Description
Public method | LoadSource | Loads the specified source code and prepares the shader part for being used.
Top
See Also

Reference

Duality.Backend Namespace


INativeShaderPart Methods

INativeShaderPart Methods

The INativeShaderPart type exposes the following members.

Methods
 | Name | Description
Public method | LoadSource | Loads the specified source code and prepares the shader part for being used.
Top
See Also

Reference

INativeShaderPart Interface
Duality.Backend Namespace


INativeShaderPart.LoadSource Method

INativeShaderPartLoadSource Method
Loads the specified source code and prepares the shader part for being used.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void LoadSource(
    string sourceCode,
    ShaderType type
)

Parameters

sourceCode
Type: SystemString
type
Type: Duality.ResourcesShaderType
See Also

Reference

INativeShaderPart Interface
Duality.Backend Namespace


INativeShaderProgram Interface

INativeShaderProgram Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeShaderProgram : IDisposable

The INativeShaderProgram type exposes the following members.

Methods
 | Name | Description
Public method | GetFields | Retrieves reflection data on the shaders fields.
Public method | LoadProgram | Loads the specified shader parts and compiles them into a single shader program.
Top
See Also

Reference

Duality.Backend Namespace


INativeShaderProgram Methods

INativeShaderProgram Methods

The INativeShaderProgram type exposes the following members.

Methods
 | Name | Description
Public method | GetFields | Retrieves reflection data on the shaders fields.
Public method | LoadProgram | Loads the specified shader parts and compiles them into a single shader program.
Top
See Also

Reference

INativeShaderProgram Interface
Duality.Backend Namespace


INativeShaderProgram.GetFields Method

INativeShaderProgramGetFields Method
Retrieves reflection data on the shaders fields.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
ShaderFieldInfo[] GetFields()

Return Value

Type: ShaderFieldInfo
See Also

Reference

INativeShaderProgram Interface
Duality.Backend Namespace


INativeShaderProgram.LoadProgram Method

INativeShaderProgramLoadProgram Method
Loads the specified shader parts and compiles them into a single shader program.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void LoadProgram(
    INativeShaderPart vertex,
    INativeShaderPart fragment
)

Parameters

vertex
Type: Duality.BackendINativeShaderPart
fragment
Type: Duality.BackendINativeShaderPart
See Also

Reference

INativeShaderProgram Interface
Duality.Backend Namespace


INativeTexture Interface

INativeTexture Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeTexture : IDisposable

The INativeTexture type exposes the following members.

Methods
 | Name | Description
Public method | GetDataT | Retrieves the textures pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | LoadDataT | Uploads the specified pixel data in RGBA format to video memory. A call to SetupEmpty(TexturePixelFormat, Int32, Int32, TextureMinFilter, TextureMagFilter, TextureWrapMode, TextureWrapMode, Int32, Boolean) is to be considered required for this.
Public method | SetupEmpty | Initializes the texture without data and configures it.
Top
See Also

Reference

Duality.Backend Namespace


INativeTexture Methods

INativeTexture Methods

The INativeTexture type exposes the following members.

Methods
 | Name | Description
Public method | GetDataT | Retrieves the textures pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.
Public method | LoadDataT | Uploads the specified pixel data in RGBA format to video memory. A call to SetupEmpty(TexturePixelFormat, Int32, Int32, TextureMinFilter, TextureMagFilter, TextureWrapMode, TextureWrapMode, Int32, Boolean) is to be considered required for this.
Public method | SetupEmpty | Initializes the texture without data and configures it.
Top
See Also

Reference

INativeTexture Interface
Duality.Backend Namespace


INativeTexture.GetData(T) Method

INativeTextureGetDataT Method
Retrieves the textures pixel data from video memory in the Rgba8 format. As a storage array type, either byte or ColorRgba is recommended.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void GetData<T>(
    T[] target,
    ColorDataLayout dataLayout,
    ColorDataElementType dataElementType
)
where T : struct, new()

Parameters

target
Type: T
The buffer to store pixel values into.
dataLayout
Type: Duality.DrawingColorDataLayout
The desired color layout of the specified buffer.
dataElementType
Type: Duality.DrawingColorDataElementType
The desired color element type of the specified buffer.

Type Parameters

T
See Also

Reference

INativeTexture Interface
Duality.Backend Namespace


INativeTexture.LoadData(T) Method

INativeTextureLoadDataT Method
Uploads the specified pixel data in RGBA format to video memory. A call to SetupEmpty(TexturePixelFormat, Int32, Int32, TextureMinFilter, TextureMagFilter, TextureWrapMode, TextureWrapMode, Int32, Boolean) is to be considered required for this.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void LoadData<T>(
    TexturePixelFormat format,
    int width,
    int height,
    T[] data,
    ColorDataLayout dataLayout,
    ColorDataElementType dataElementType
)
where T : struct, new()

Parameters

format
Type: Duality.DrawingTexturePixelFormat
The textures internal format.
width
Type: SystemInt32
height
Type: SystemInt32
data
Type: T
The block of pixel data to transfer.
dataLayout
Type: Duality.DrawingColorDataLayout
The color layout of the specified data block.
dataElementType
Type: Duality.DrawingColorDataElementType
The color element type of the specified data block.

Type Parameters

T
See Also

Reference

INativeTexture Interface
Duality.Backend Namespace


INativeTexture.SetupEmpty Method

INativeTextureSetupEmpty Method
Initializes the texture without data and configures it.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void SetupEmpty(
    TexturePixelFormat format,
    int width,
    int height,
    TextureMinFilter minFilter,
    TextureMagFilter magFilter,
    TextureWrapMode wrapX,
    TextureWrapMode wrapY,
    int anisoLevel,
    bool mipmaps
)

Parameters

format
Type: Duality.DrawingTexturePixelFormat
width
Type: SystemInt32
height
Type: SystemInt32
minFilter
Type: Duality.DrawingTextureMinFilter
magFilter
Type: Duality.DrawingTextureMagFilter
wrapX
Type: Duality.DrawingTextureWrapMode
wrapY
Type: Duality.DrawingTextureWrapMode
anisoLevel
Type: SystemInt32
mipmaps
Type: SystemBoolean
See Also

Reference

INativeTexture Interface
Duality.Backend Namespace


INativeWindow Interface

INativeWindow Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface INativeWindow : IDisposable

The INativeWindow type exposes the following members.

Methods
 | Name | Description
Public method | Run |
Top
See Also

Reference

Duality.Backend Namespace


INativeWindow Methods

INativeWindow Methods

The INativeWindow type exposes the following members.

Methods
 | Name | Description
Public method | Run |
Top
See Also

Reference

INativeWindow Interface
Duality.Backend Namespace


INativeWindow.Run Method

INativeWindowRun Method

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Run()
See Also

Reference

INativeWindow Interface
Duality.Backend Namespace


IPluginLoader Interface

IPluginLoader Interface
Specifies an API for enumerating and loading plugin Assemblies.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IPluginLoader

The IPluginLoader type exposes the following members.

Methods
 | Name | Description
Public method | GetAssemblyHash | Determines the hash code of the specified Assembly. This may be used for verification or comparison purposes, such as determining whether two Assemblies are equal.
Public method | Init | Initializes the plugin loader.
Public method | LoadAssembly | Loads a plugin Assembly from the specified path. For reliable cross-platform usage, that path should be one of the AvailableAssemblyPaths.
Public method | Terminate | Terminates the plugin loader and provides the opportunity for its implementation to shut down properly.
Top
Properties
 | Name | Description
Public property | AvailableAssemblyPaths | [GET] Enumerates all plugin Assemblies that are available for loading.
Public property | BaseDirectories | [GET] Enumerates all base directories that will be searched for plugin Assemblies.
Public property | LoadedAssemblies | [GET] Enumerates all Assemblies that are currently loaded in the context of this application.
Top
Events
 | Name | Description
Public event | AssemblyLoaded | Fired when an Assembly is loaded by the runtime.
Public event | AssemblyResolve | Fired when the runtime attempts to resolve a non-trivial Assembly dependency, which may or may not be a plugin. Handling this event allows to specify which Assembly to use.
Top
See Also

Reference

Duality.Backend Namespace


IPluginLoader Methods

IPluginLoader Methods

The IPluginLoader type exposes the following members.

Methods
 | Name | Description
Public method | GetAssemblyHash | Determines the hash code of the specified Assembly. This may be used for verification or comparison purposes, such as determining whether two Assemblies are equal.
Public method | Init | Initializes the plugin loader.
Public method | LoadAssembly | Loads a plugin Assembly from the specified path. For reliable cross-platform usage, that path should be one of the AvailableAssemblyPaths.
Public method | Terminate | Terminates the plugin loader and provides the opportunity for its implementation to shut down properly.
Top
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.GetAssemblyHash Method

IPluginLoaderGetAssemblyHash Method
Determines the hash code of the specified Assembly. This may be used for verification or comparison purposes, such as determining whether two Assemblies are equal.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int GetAssemblyHash(
    string assemblyPath
)

Parameters

assemblyPath
Type: SystemString

Return Value

Type: Int32
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.Init Method

IPluginLoaderInit Method
Initializes the plugin loader.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Init()
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.LoadAssembly Method

IPluginLoaderLoadAssembly Method
Loads a plugin Assembly from the specified path. For reliable cross-platform usage, that path should be one of the AvailableAssemblyPaths.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Assembly LoadAssembly(
    string assemblyPath
)

Parameters

assemblyPath
Type: SystemString
The path from which the Assembly will be loaded.

Return Value

Type: Assembly
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.Terminate Method

IPluginLoaderTerminate Method
Terminates the plugin loader and provides the opportunity for its implementation to shut down properly.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Terminate()
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader Properties

IPluginLoader Properties

The IPluginLoader type exposes the following members.

Properties
 | Name | Description
Public property | AvailableAssemblyPaths | [GET] Enumerates all plugin Assemblies that are available for loading.
Public property | BaseDirectories | [GET] Enumerates all base directories that will be searched for plugin Assemblies.
Public property | LoadedAssemblies | [GET] Enumerates all Assemblies that are currently loaded in the context of this application.
Top
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.AvailableAssemblyPaths Property

IPluginLoaderAvailableAssemblyPaths Property
[GET] Enumerates all plugin Assemblies that are available for loading.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<string> AvailableAssemblyPaths { get; }

Property Value

Type: IEnumerable String
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.BaseDirectories Property

IPluginLoaderBaseDirectories Property
[GET] Enumerates all base directories that will be searched for plugin Assemblies.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<string> BaseDirectories { get; }

Property Value

Type: IEnumerable String
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.LoadedAssemblies Property

IPluginLoaderLoadedAssemblies Property
[GET] Enumerates all Assemblies that are currently loaded in the context of this application.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<Assembly> LoadedAssemblies { get; }

Return Value

Type: IEnumerable Assembly
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader Events

IPluginLoader Events

The IPluginLoader type exposes the following members.

Events
 | Name | Description
Public event | AssemblyLoaded | Fired when an Assembly is loaded by the runtime.
Public event | AssemblyResolve | Fired when the runtime attempts to resolve a non-trivial Assembly dependency, which may or may not be a plugin. Handling this event allows to specify which Assembly to use.
Top
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.AssemblyLoaded Event

IPluginLoaderAssemblyLoaded Event
Fired when an Assembly is loaded by the runtime.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
event EventHandler<AssemblyLoadedEventArgs> AssemblyLoaded

Value

Type: SystemEventHandler AssemblyLoadedEventArgs
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


IPluginLoader.AssemblyResolve Event

IPluginLoaderAssemblyResolve Event
Fired when the runtime attempts to resolve a non-trivial Assembly dependency, which may or may not be a plugin. Handling this event allows to specify which Assembly to use.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
event EventHandler<AssemblyResolveEventArgs> AssemblyResolve

Value

Type: SystemEventHandler AssemblyResolveEventArgs
See Also

Reference

IPluginLoader Interface
Duality.Backend Namespace


ISystemBackend Interface

ISystemBackend Interface

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ISystemBackend : IDualityBackend

The ISystemBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | GetNamedPath | Retrieves the path of a named / special directory.
Public method | Init | (Inherited from IDualityBackend.)
Public method | Shutdown | (Inherited from IDualityBackend.)
Top
Properties
 | Name | Description
Public property | FileSystem | [GET] An interface that provides file system access on the current platform.
Public property | Id | (Inherited from IDualityBackend.)
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

Duality.Backend Namespace


ISystemBackend Methods

ISystemBackend Methods

The ISystemBackend type exposes the following members.

Methods
 | Name | Description
Public method | CheckAvailable | (Inherited from IDualityBackend.)
Public method | GetNamedPath | Retrieves the path of a named / special directory.
Public method | Init | (Inherited from IDualityBackend.)
Public method | Shutdown | (Inherited from IDualityBackend.)
Top
See Also

Reference

ISystemBackend Interface
Duality.Backend Namespace


ISystemBackend.GetNamedPath Method

ISystemBackendGetNamedPath Method
Retrieves the path of a named / special directory.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string GetNamedPath(
    NamedDirectory dir
)

Parameters

dir
Type: Duality.IONamedDirectory

Return Value

Type: String
See Also

Reference

ISystemBackend Interface
Duality.Backend Namespace


ISystemBackend Properties

ISystemBackend Properties

The ISystemBackend type exposes the following members.

Properties
 | Name | Description
Public property | FileSystem | [GET] An interface that provides file system access on the current platform.
Public property | Id | (Inherited from IDualityBackend.)
Public property | Name | (Inherited from IDualityBackend.)
Public property | Priority | (Inherited from IDualityBackend.)
Top
See Also

Reference

ISystemBackend Interface
Duality.Backend Namespace


ISystemBackend.FileSystem Property

ISystemBackendFileSystem Property
[GET] An interface that provides file system access on the current platform.

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IFileSystem FileSystem { get; }

Property Value

Type: IFileSystem
See Also

Reference

ISystemBackend Interface
Duality.Backend Namespace


RenderOptions Class

RenderOptions Class
Inheritance Hierarchy
SystemObject
Duality.BackendRenderOptions

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RenderOptions

The RenderOptions type exposes the following members.

Constructors
 | Name | Description
Public method | RenderOptions | Initializes a new instance of the RenderOptions class
Top
Properties
 | Name | Description
Public property | ClearColor |
Public property | ClearDepth |
Public property | ClearFlags |
Public property | ModelViewMatrix |
Public property | ProjectionMatrix |
Public property | RenderMode |
Public property | Target |
Public property | Viewport |
Top
See Also

Reference

Duality.Backend Namespace


RenderOptions Constructor

RenderOptions Constructor
Initializes a new instance of the RenderOptions class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderOptions()
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions Properties

RenderOptions Properties

The RenderOptions type exposes the following members.

Properties
 | Name | Description
Public property | ClearColor |
Public property | ClearDepth |
Public property | ClearFlags |
Public property | ModelViewMatrix |
Public property | ProjectionMatrix |
Public property | RenderMode |
Public property | Target |
Public property | Viewport |
Top
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.ClearColor Property

RenderOptionsClearColor Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ClearColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.ClearDepth Property

RenderOptionsClearDepth Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ClearDepth { get; set; }

Property Value

Type: Single
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.ClearFlags Property

RenderOptionsClearFlags Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ClearFlag ClearFlags { get; set; }

Property Value

Type: ClearFlag
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.ModelViewMatrix Property

RenderOptionsModelViewMatrix Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Matrix4 ModelViewMatrix { get; set; }

Property Value

Type: Matrix4
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.ProjectionMatrix Property

RenderOptionsProjectionMatrix Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Matrix4 ProjectionMatrix { get; set; }

Property Value

Type: Matrix4
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.RenderMode Property

RenderOptionsRenderMode Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderMatrix RenderMode { get; set; }

Property Value

Type: RenderMatrix
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.Target Property

RenderOptionsTarget Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeRenderTarget Target { get; set; }

Property Value

Type: INativeRenderTarget
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderOptions.Viewport Property

RenderOptionsViewport Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect Viewport { get; set; }

Property Value

Type: Rect
See Also

Reference

RenderOptions Class
Duality.Backend Namespace


RenderStats Class

RenderStats Class
Inheritance Hierarchy
SystemObject
Duality.BackendRenderStats

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RenderStats

The RenderStats type exposes the following members.

Constructors
 | Name | Description
Public method | RenderStats | Initializes a new instance of the RenderStats class
Top
Properties
 | Name | Description
Public property | DrawCalls |
Top
See Also

Reference

Duality.Backend Namespace


RenderStats Constructor

RenderStats Constructor
Initializes a new instance of the RenderStats class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderStats()
See Also

Reference

RenderStats Class
Duality.Backend Namespace


RenderStats Properties

RenderStats Properties

The RenderStats type exposes the following members.

Properties
 | Name | Description
Public property | DrawCalls |
Top
See Also

Reference

RenderStats Class
Duality.Backend Namespace


RenderStats.DrawCalls Property

RenderStatsDrawCalls Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int DrawCalls { get; set; }

Property Value

Type: Int32
See Also

Reference

RenderStats Class
Duality.Backend Namespace


WindowOptions Class

WindowOptions Class
Inheritance Hierarchy
SystemObject
Duality.BackendWindowOptions

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class WindowOptions

The WindowOptions type exposes the following members.

Constructors
 | Name | Description
Public method | WindowOptions | Initializes a new instance of the WindowOptions class
Top
Properties
 | Name | Description
Public property | Height |
Public property | RefreshMode |
Public property | ScreenMode |
Public property | SystemCursorVisible |
Public property | Title |
Public property | Width |
Top
See Also

Reference

Duality.Backend Namespace


WindowOptions Constructor

WindowOptions Constructor
Initializes a new instance of the WindowOptions class

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public WindowOptions()
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions Properties

WindowOptions Properties

The WindowOptions type exposes the following members.

Properties
 | Name | Description
Public property | Height |
Public property | RefreshMode |
Public property | ScreenMode |
Public property | SystemCursorVisible |
Public property | Title |
Public property | Width |
Top
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.Height Property

WindowOptionsHeight Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; set; }

Property Value

Type: Int32
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.RefreshMode Property

WindowOptionsRefreshMode Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RefreshMode RefreshMode { get; set; }

Property Value

Type: RefreshMode
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.ScreenMode Property

WindowOptionsScreenMode Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ScreenMode ScreenMode { get; set; }

Property Value

Type: ScreenMode
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.SystemCursorVisible Property

WindowOptionsSystemCursorVisible Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool SystemCursorVisible { get; set; }

Property Value

Type: Boolean
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.Title Property

WindowOptionsTitle Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Title { get; set; }

Property Value

Type: String
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


WindowOptions.Width Property

WindowOptionsWidth Property

Namespace: Duality.Backend
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; set; }

Property Value

Type: Int32
See Also

Reference

WindowOptions Class
Duality.Backend Namespace


Duality.Backend.Dummy Namespace

Duality.Backend.Dummy Namespace
Classes
 | Class | Description
Public class | DummyAudioBackend |
Public class | DummyFileSystem |
Public class | DummyGraphicsBackend |
Public class | DummyNativeAudioBuffer |
Public class | DummyNativeAudioSource |
Public class | DummyPluginLoader |
Public class | DummySystemBackend |


DummyAudioBackend Class

DummyAudioBackend Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyAudioBackend

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyAudioBackend : IAudioBackend,
    IDualityBackend

The DummyAudioBackend type exposes the following members.

Constructors
 | Name | Description
Public method | DummyAudioBackend | Initializes a new instance of the DummyAudioBackend class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyAudioBackend Constructor

DummyAudioBackend Constructor
Initializes a new instance of the DummyAudioBackend class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyAudioBackend()
See Also

Reference

DummyAudioBackend Class
Duality.Backend.Dummy Namespace


DummyFileSystem Class

DummyFileSystem Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyFileSystem

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyFileSystem : IFileSystem

The DummyFileSystem type exposes the following members.

Constructors
 | Name | Description
Public method | DummyFileSystem | Initializes a new instance of the DummyFileSystem class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyFileSystem Constructor

DummyFileSystem Constructor
Initializes a new instance of the DummyFileSystem class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyFileSystem()
See Also

Reference

DummyFileSystem Class
Duality.Backend.Dummy Namespace


DummyGraphicsBackend Class

DummyGraphicsBackend Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyGraphicsBackend

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyGraphicsBackend : IGraphicsBackend,
    IDualityBackend

The DummyGraphicsBackend type exposes the following members.

Constructors
 | Name | Description
Public method | DummyGraphicsBackend | Initializes a new instance of the DummyGraphicsBackend class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyGraphicsBackend Constructor

DummyGraphicsBackend Constructor
Initializes a new instance of the DummyGraphicsBackend class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyGraphicsBackend()
See Also

Reference

DummyGraphicsBackend Class
Duality.Backend.Dummy Namespace


DummyNativeAudioBuffer Class

DummyNativeAudioBuffer Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyNativeAudioBuffer

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyNativeAudioBuffer : INativeAudioBuffer,
    IDisposable

The DummyNativeAudioBuffer type exposes the following members.

Constructors
 | Name | Description
Public method | DummyNativeAudioBuffer | Initializes a new instance of the DummyNativeAudioBuffer class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyNativeAudioBuffer Constructor

DummyNativeAudioBuffer Constructor
Initializes a new instance of the DummyNativeAudioBuffer class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyNativeAudioBuffer()
See Also

Reference

DummyNativeAudioBuffer Class
Duality.Backend.Dummy Namespace


DummyNativeAudioSource Class

DummyNativeAudioSource Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyNativeAudioSource

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyNativeAudioSource : INativeAudioSource,
    IDisposable

The DummyNativeAudioSource type exposes the following members.

Constructors
 | Name | Description
Public method | DummyNativeAudioSource | Initializes a new instance of the DummyNativeAudioSource class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyNativeAudioSource Constructor

DummyNativeAudioSource Constructor
Initializes a new instance of the DummyNativeAudioSource class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyNativeAudioSource()
See Also

Reference

DummyNativeAudioSource Class
Duality.Backend.Dummy Namespace


DummyPluginLoader Class

DummyPluginLoader Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummyPluginLoader

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummyPluginLoader : IPluginLoader

The DummyPluginLoader type exposes the following members.

Constructors
 | Name | Description
Public method | DummyPluginLoader | Initializes a new instance of the DummyPluginLoader class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummyPluginLoader Constructor

DummyPluginLoader Constructor
Initializes a new instance of the DummyPluginLoader class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummyPluginLoader()
See Also

Reference

DummyPluginLoader Class
Duality.Backend.Dummy Namespace


DummySystemBackend Class

DummySystemBackend Class
Inheritance Hierarchy
SystemObject
Duality.Backend.DummyDummySystemBackend

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DummySystemBackend : ISystemBackend,
    IDualityBackend

The DummySystemBackend type exposes the following members.

Constructors
 | Name | Description
Public method | DummySystemBackend | Initializes a new instance of the DummySystemBackend class
Top
See Also

Reference

Duality.Backend.Dummy Namespace


DummySystemBackend Constructor

DummySystemBackend Constructor
Initializes a new instance of the DummySystemBackend class

Namespace: Duality.Backend.Dummy
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DummySystemBackend()
See Also

Reference

DummySystemBackend Class
Duality.Backend.Dummy Namespace


Duality.Cloning Namespace

Duality.Cloning Namespace
Classes
 | Class | Description
Public class | CloneBehaviorAttribute | Specifies the cloning behavior of a certain class, struct or field.
Public class | CloneFieldAttribute |
Public class | CloneProvider |
Public class | CloneProviderContext | Describes the context of a cloning operation
Public class | CloneSurrogateT | Default base class for Serialization Surrogates. It implements both ICloneSurrogate and ICloneExplicit, thus being able to fully perform de/serialization of a designated object type.
Public class | CloneType | The CloneType class provides cached cloning-relevant information that has been generated basing on a Type.
Public class | ExtMethodsCloning |
Public class | ExtMethodsICloneOperation |
Public class | ManuallyClonedAttribute | Flags a field or class to be skipped by automatic cloning, because it has been handled by an ICloneExplicit implementation. Applying this attribute to a class has the same effect as applying it to all locally declared fields (without inheritance).
Structures
 | Structure | Description
Public structure | CloneTypeCloneField |
Interfaces
 | Interface | Description
Public interface | ICloneExplicit | Provides a general interface for an object type that will provide and explicit method for cloning rather than falling back to automated cloning behavior.
Public interface | ICloneOperation |
Public interface | ICloneSurrogate | Clones an object instead of letting it clone itsself or using a Reflection-driven approach.
Public interface | ICloneTargetSetup |
Delegates
 | Delegate | Description
Public delegate | CloneTypeAssignmentFunc |
Public delegate | CloneTypeSetupFunc |
Public delegate | CloneTypeValueAssignmentFuncT |
Public delegate | CloneTypeValueSetupFuncT |
Enumerations
 | Enumeration | Description
Public enumeration | CloneBehavior |
Public enumeration | CloneFieldFlags |


CloneBehavior Enumeration

CloneBehavior Enumeration

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum CloneBehavior
Members
Member name | Value | Description
Default | 0 | The object will be handled automatically according to its Type properties and Attributes.
Reference | 1 | The object will be assigned by-reference, because external ownership is assumed.
ChildObject | 2 | The object will be cloned deeply, because local ownership is assumed.
WeakReference | 3 | If the referenced object is part of the cloned object graph, it will be assigned by-reference similar to the Reference setting. Otherwise, it will be skipped without assigning any value. A typical example are "parent"-backreferences from child objects.
See Also

Reference

Duality.Cloning Namespace


CloneBehaviorAttribute Class

CloneBehaviorAttribute Class
Specifies the cloning behavior of a certain class, struct or field.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.CloningCloneBehaviorAttribute

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CloneBehaviorAttribute : Attribute

The CloneBehaviorAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | CloneBehaviorAttribute(CloneBehavior) | Initializes a new instance of the CloneBehaviorAttribute class
Public method | CloneBehaviorAttribute(Type, CloneBehavior) | Initializes a new instance of the CloneBehaviorAttribute class
Top
Properties
 | Name | Description
Public property | Behavior |
Public property | TargetType |
Top
See Also

Reference

Duality.Cloning Namespace


CloneBehaviorAttribute Constructor

CloneBehaviorAttribute Constructor
Overload List
 | Name | Description
Public method | CloneBehaviorAttribute(CloneBehavior) | Initializes a new instance of the CloneBehaviorAttribute class
Public method | CloneBehaviorAttribute(Type, CloneBehavior) | Initializes a new instance of the CloneBehaviorAttribute class
Top
See Also

Reference

CloneBehaviorAttribute Class
Duality.Cloning Namespace


CloneBehaviorAttribute Constructor (CloneBehavior)

CloneBehaviorAttribute Constructor (CloneBehavior)
Initializes a new instance of the CloneBehaviorAttribute class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneBehaviorAttribute(
    CloneBehavior behavior
)

Parameters

behavior
Type: Duality.CloningCloneBehavior
See Also

Reference

CloneBehaviorAttribute Class
CloneBehaviorAttribute Overload
Duality.Cloning Namespace


CloneBehaviorAttribute Constructor (Type, CloneBehavior)

CloneBehaviorAttribute Constructor (Type, CloneBehavior)
Initializes a new instance of the CloneBehaviorAttribute class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneBehaviorAttribute(
    Type targetType,
    CloneBehavior behavior
)

Parameters

targetType
Type: SystemType
behavior
Type: Duality.CloningCloneBehavior
See Also

Reference

CloneBehaviorAttribute Class
CloneBehaviorAttribute Overload
Duality.Cloning Namespace


CloneBehaviorAttribute Properties

CloneBehaviorAttribute Properties

The CloneBehaviorAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Behavior |
Public property | TargetType |
Top
See Also

Reference

CloneBehaviorAttribute Class
Duality.Cloning Namespace


CloneBehaviorAttribute.Behavior Property

CloneBehaviorAttributeBehavior Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneBehavior Behavior { get; }

Property Value

Type: CloneBehavior
See Also

Reference

CloneBehaviorAttribute Class
Duality.Cloning Namespace


CloneBehaviorAttribute.TargetType Property

CloneBehaviorAttributeTargetType Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type TargetType { get; }

Property Value

Type: Type
See Also

Reference

CloneBehaviorAttribute Class
Duality.Cloning Namespace


CloneFieldAttribute Class

CloneFieldAttribute Class
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.CloningCloneFieldAttribute

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CloneFieldAttribute : Attribute

The CloneFieldAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | CloneFieldAttribute | Initializes a new instance of the CloneFieldAttribute class
Top
Properties
 | Name | Description
Public property | Flags |
Top
See Also

Reference

Duality.Cloning Namespace


CloneFieldAttribute Constructor

CloneFieldAttribute Constructor
Initializes a new instance of the CloneFieldAttribute class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneFieldAttribute(
    CloneFieldFlags flags
)

Parameters

flags
Type: Duality.CloningCloneFieldFlags
See Also

Reference

CloneFieldAttribute Class
Duality.Cloning Namespace


CloneFieldAttribute Properties

CloneFieldAttribute Properties

The CloneFieldAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Flags |
Top
See Also

Reference

CloneFieldAttribute Class
Duality.Cloning Namespace


CloneFieldAttribute.Flags Property

CloneFieldAttributeFlags Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneFieldFlags Flags { get; }

Property Value

Type: CloneFieldFlags
See Also

Reference

CloneFieldAttribute Class
Duality.Cloning Namespace


CloneFieldFlags Enumeration

CloneFieldFlags Enumeration

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum CloneFieldFlags
Members
Member name | Value | Description
None | 0 | No flags are set at all.
IdentityRelevant | 1 | States that the Field or Object in question is relevant to its parents identity and thus should not be cloned in an identity-preserving context.
Skip | 2 | The Field or Object in question will always be skipped during cloning. No value will be assigned at all.
DontSkip | 4 | The Field or Object in question won't be skipped during cloning due to secondary hints such as a DontSerializeAttribute attribute on the same field.
See Also

Reference

Duality.Cloning Namespace


CloneProvider Class

CloneProvider Class
Inheritance Hierarchy
SystemObject
Duality.CloningCloneProvider

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CloneProvider : ICloneTargetSetup,
    ICloneOperation

The CloneProvider type exposes the following members.

Constructors
 | Name | Description
Public method | CloneProvider | Initializes a new instance of the CloneProvider class
Top
Methods
 | Name | Description
Public method | ClearCachedMapping | Clears the clone providers internal mapping between source and target object graph. This is done automatically, unless the copy or clone operation has been performed with explicitly preserving the cache.
Public method | CloneObjectT | Clones the specified object and returns the cloned instance.
Public method | CopyObjectT | Copies the specified source object graph to the specified target object graph. Where possible, existing objects will be preserved and updated, rather than being overwritten.
 | GetCloneType | Returns the CloneType of a Type.
Top
Extension Methods
 | Name | Description
Public Extension Method | HandleObjectT(T, T) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Public Extension Method | HandleObjectT(T, T, Boolean) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Top
Properties
 | Name | Description
Public property | Context | [GET] Provides information about the context in which the operation is performed.
Top
See Also

Reference

Duality.Cloning Namespace


CloneProvider Constructor

CloneProvider Constructor
Initializes a new instance of the CloneProvider class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneProvider(
    CloneProviderContext context = null
)

Parameters

context (Optional)
Type: Duality.CloningCloneProviderContext
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider Methods

CloneProvider Methods

The CloneProvider type exposes the following members.

Methods
 | Name | Description
Public method | ClearCachedMapping | Clears the clone providers internal mapping between source and target object graph. This is done automatically, unless the copy or clone operation has been performed with explicitly preserving the cache.
Public method | CloneObjectT | Clones the specified object and returns the cloned instance.
Public method | CopyObjectT | Copies the specified source object graph to the specified target object graph. Where possible, existing objects will be preserved and updated, rather than being overwritten.
 | GetCloneType | Returns the CloneType of a Type.
Top
Extension Methods
 | Name | Description
Public Extension Method | HandleObjectT(T, T) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Public Extension Method | HandleObjectT(T, T, Boolean) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Top
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider.ClearCachedMapping Method

CloneProviderClearCachedMapping Method
Clears the clone providers internal mapping between source and target object graph. This is done automatically, unless the copy or clone operation has been performed with explicitly preserving the cache.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearCachedMapping()
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider.CloneObject(T) Method

CloneProviderCloneObjectT Method
Clones the specified object and returns the cloned instance.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T CloneObject<T>(
    T source,
    bool preserveCache = false
)

Parameters

source
Type: T
preserveCache (Optional)
Type: SystemBoolean
If true, the mapping between source and target object graph is preserved. This can be useful for doing a partial clone operation that is later continued or repeated using the same CloneProvider instance. Since the mapping is already present, performance of subsequent clone operations within the same object graph can benefit by this.

Type Parameters

T

Return Value

Type: T
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider.CopyObject(T) Method

CloneProviderCopyObjectT Method
Copies the specified source object graph to the specified target object graph. Where possible, existing objects will be preserved and updated, rather than being overwritten.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyObject<T>(
    T source,
    T target,
    bool preserveCache = false
)

Parameters

source
Type: T
target
Type: T
preserveCache (Optional)
Type: SystemBoolean
If true, the mapping between source and target object graph is preserved. This can be useful for doing a partial clone operation that is later continued or repeated using the same CloneProvider instance. Since the mapping is already present, performance of subsequent clone operations within the same object graph can benefit by this.

Type Parameters

T
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider.GetCloneType Method

CloneProviderGetCloneType Method
Returns the CloneType of a Type.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal static CloneType GetCloneType(
    Type type
)

Parameters

type
Type: SystemType

Return Value

Type: CloneType
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider Properties

CloneProvider Properties

The CloneProvider type exposes the following members.

Properties
 | Name | Description
Public property | Context | [GET] Provides information about the context in which the operation is performed.
Top
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProvider.Context Property

CloneProviderContext Property
[GET] Provides information about the context in which the operation is performed.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneProviderContext Context { get; }

Property Value

Type: CloneProviderContext

Implements

ICloneTargetSetupContext
ICloneOperationContext
See Also

Reference

CloneProvider Class
Duality.Cloning Namespace


CloneProviderContext Class

CloneProviderContext Class
Describes the context of a cloning operation
Inheritance Hierarchy
SystemObject
Duality.CloningCloneProviderContext
Duality.ResourcesApplyPrefabContext

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CloneProviderContext

The CloneProviderContext type exposes the following members.

Constructors
 | Name | Description
Public method | CloneProviderContext | Initializes a new instance of the CloneProviderContext class
Top
Fields
 | Name | Description
 | Default | A standard cloning operation.
Protected field | preserveIdentity |
Top
Properties
 | Name | Description
Public property | PreserveIdentity | [GET] Should the operation preserve each objects identity? If false, specific identity-preserving data field such as Guid or Id fields will be copied as well. This might result in duplicate IDs.
Top
See Also

Reference

Duality.Cloning Namespace


CloneProviderContext Constructor

CloneProviderContext Constructor
Initializes a new instance of the CloneProviderContext class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneProviderContext(
    bool preserveId = true
)

Parameters

preserveId (Optional)
Type: SystemBoolean
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneProviderContext Fields

CloneProviderContext Fields

The CloneProviderContext type exposes the following members.

Fields
 | Name | Description
 | Default | A standard cloning operation.
Protected field | preserveIdentity |
Top
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneProviderContext.Default Field

CloneProviderContextDefault Field
A standard cloning operation.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly CloneProviderContext Default

Field Value

Type: CloneProviderContext
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneProviderContext.preserveIdentity Field

CloneProviderContextpreserveIdentity Field

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected bool preserveIdentity

Field Value

Type: Boolean
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneProviderContext Properties

CloneProviderContext Properties

The CloneProviderContext type exposes the following members.

Properties
 | Name | Description
Public property | PreserveIdentity | [GET] Should the operation preserve each objects identity? If false, specific identity-preserving data field such as Guid or Id fields will be copied as well. This might result in duplicate IDs.
Top
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneProviderContext.PreserveIdentity Property

CloneProviderContextPreserveIdentity Property
[GET] Should the operation preserve each objects identity? If false, specific identity-preserving data field such as Guid or Id fields will be copied as well. This might result in duplicate IDs.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool PreserveIdentity { get; }

Property Value

Type: Boolean
See Also

Reference

CloneProviderContext Class
Duality.Cloning Namespace


CloneSurrogate(T) Class

CloneSurrogateT Class
Default base class for Serialization Surrogates. It implements both ICloneSurrogate and ICloneExplicit, thus being able to fully perform de/serialization of a designated object type.
Inheritance Hierarchy
SystemObject
Duality.CloningCloneSurrogateT
Duality.Cloning.SurrogatesDelegateSurrogate
Duality.Cloning.SurrogatesDictionarySurrogate

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class CloneSurrogate<T> : ICloneSurrogate
where T : class

Type Parameters

T
The base Type of objects this surrogate can replace.

The CloneSurrogateT type exposes the following members.

Constructors
 | Name | Description
Protected method | CloneSurrogateT | Initializes a new instance of the CloneSurrogateT class
Top
Methods
 | Name | Description
Public method | CopyDataTo |
Public method | CreateTargetObject |
Public method | CreateTargetObjectLate |
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type.
Public method | SetupCloneTargets |
Top
Properties
 | Name | Description
Protected property | IsImmutableTarget | [GET] Returns whether the surrogates client object is considered to be immutable, e.g. whether it will always be required to create a target object, even if an existing one is provided by the target object graph.
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.
Top
See Also

Reference

Duality.Cloning Namespace


CloneSurrogate(T) Constructor

CloneSurrogateT Constructor
Initializes a new instance of the CloneSurrogateT class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected CloneSurrogate()
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T) Methods

CloneSurrogateT Methods

The CloneSurrogateT generic type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo |
Public method | CreateTargetObject |
Public method | CreateTargetObjectLate |
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type.
Public method | SetupCloneTargets |
Top
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).CopyDataTo Method

CloneSurrogateTCopyDataTo Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void CopyDataTo(
    T source,
    T target,
    ICloneOperation operation
)

Parameters

source
Type: T
target
Type: T
operation
Type: Duality.CloningICloneOperation
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).CreateTargetObject Method

CloneSurrogateTCreateTargetObject Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void CreateTargetObject(
    T source,
    ref T target,
    ICloneTargetSetup setup
)

Parameters

source
Type: T
target
Type: T
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).CreateTargetObjectLate Method

CloneSurrogateTCreateTargetObjectLate Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void CreateTargetObjectLate(
    T source,
    ref T target,
    ICloneOperation operation
)

Parameters

source
Type: T
target
Type: T
operation
Type: Duality.CloningICloneOperation
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).MatchesType Method

CloneSurrogateTMatchesType Method
Checks whether this surrogate is able to clone the specified object type.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo
The TypeInfo of the object in question.

Return Value

Type: Boolean
True, if this surrogate is able to clone such object, false if not.

Implements

ICloneSurrogateMatchesType(TypeInfo)
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).SetupCloneTargets Method

CloneSurrogateTSetupCloneTargets Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void SetupCloneTargets(
    T source,
    T target,
    ICloneTargetSetup setup
)

Parameters

source
Type: T
target
Type: T
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T) Properties

CloneSurrogateT Properties

The CloneSurrogateT generic type exposes the following members.

Properties
 | Name | Description
Protected property | IsImmutableTarget | [GET] Returns whether the surrogates client object is considered to be immutable, e.g. whether it will always be required to create a target object, even if an existing one is provided by the target object graph.
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.
Top
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).IsImmutableTarget Property

CloneSurrogateTIsImmutableTarget Property
[GET] Returns whether the surrogates client object is considered to be immutable, e.g. whether it will always be required to create a target object, even if an existing one is provided by the target object graph.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual bool IsImmutableTarget { get; }

Property Value

Type: Boolean
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).Priority Property

CloneSurrogateTPriority Property
[GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual int Priority { get; }

Property Value

Type: Int32

Implements

ICloneSurrogatePriority
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneSurrogate(T).RequireMerge Property

CloneSurrogateTRequireMerge Property
[GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool RequireMerge { get; }

Property Value

Type: Boolean

Implements

ICloneSurrogateRequireMerge
See Also

Reference

CloneSurrogateT Class
Duality.Cloning Namespace


CloneType Class

CloneType Class
The CloneType class provides cached cloning-relevant information that has been generated basing on a Type.
Inheritance Hierarchy
SystemObject
Duality.CloningCloneType

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class CloneType

The CloneType type exposes the following members.

Constructors
 | Name | Description
Public method | CloneType | Creates a new CloneType based on a Type, gathering all the information that is necessary for cloning.
Top
Methods
 | Name | Description
Public method | Init |
Public method | ToString | (Overrides ObjectToString.)
Top
Properties
 | Name | Description
Public property | CouldBeDerived | [GET] Returns whether the cached Type could be derived by others.
Public property | DefaultCloneBehavior | [GET] Returns the default CloneBehavior exposed by this type.
Public property | ElementType | [GET] Returns the elements CloneType, if this one is an array.
Public property | FieldData | [GET] An array of fields which are cloned.
Public property | InvestigateOwnership | [GET] Specifies whether this Type requires any ownership handling, i.e. contains children or weak references.
Public property | IsArray | [GET] Returns whether the encapsulated Type is an array.
Public property | IsMergeSurrogate | [GET] Returns whether the cached type is handled by a merge surrogate.
Public property | IsPlainOldData | [GET] Specifies whether this Type can be considered plain old data, i.e. can be cloned by assignment.
Public property | PrecompiledAssignmentFunc | [GET] When available, this property returns a compiled lambda function that assigns all plain old data fields of this Type
Public property | PrecompiledSetupFunc |
Public property | PrecompiledValueAssignmentFunc |
Public property | PrecompiledValueSetupFunc |
Public property | Surrogate | [GET] The surrogate that will handle this types cloning operations.
Public property | Type | [GET] The Type that is described.
Top
See Also

Reference

Duality.Cloning Namespace


CloneType Constructor

CloneType Constructor
Creates a new CloneType based on a Type, gathering all the information that is necessary for cloning.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneType(
    Type type
)

Parameters

type
Type: SystemType
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType Methods

CloneType Methods

The CloneType type exposes the following members.

Methods
 | Name | Description
Public method | Init |
Public method | ToString | (Overrides ObjectToString.)
Top
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.Init Method

CloneTypeInit Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Init()
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.ToString Method

CloneTypeToString Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType Properties

CloneType Properties

The CloneType type exposes the following members.

Properties
 | Name | Description
Public property | CouldBeDerived | [GET] Returns whether the cached Type could be derived by others.
Public property | DefaultCloneBehavior | [GET] Returns the default CloneBehavior exposed by this type.
Public property | ElementType | [GET] Returns the elements CloneType, if this one is an array.
Public property | FieldData | [GET] An array of fields which are cloned.
Public property | InvestigateOwnership | [GET] Specifies whether this Type requires any ownership handling, i.e. contains children or weak references.
Public property | IsArray | [GET] Returns whether the encapsulated Type is an array.
Public property | IsMergeSurrogate | [GET] Returns whether the cached type is handled by a merge surrogate.
Public property | IsPlainOldData | [GET] Specifies whether this Type can be considered plain old data, i.e. can be cloned by assignment.
Public property | PrecompiledAssignmentFunc | [GET] When available, this property returns a compiled lambda function that assigns all plain old data fields of this Type
Public property | PrecompiledSetupFunc |
Public property | PrecompiledValueAssignmentFunc |
Public property | PrecompiledValueSetupFunc |
Public property | Surrogate | [GET] The surrogate that will handle this types cloning operations.
Public property | Type | [GET] The Type that is described.
Top
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.CouldBeDerived Property

CloneTypeCouldBeDerived Property
[GET] Returns whether the cached Type could be derived by others.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool CouldBeDerived { get; }

Property Value

Type: Boolean
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.DefaultCloneBehavior Property

CloneTypeDefaultCloneBehavior Property
[GET] Returns the default CloneBehavior exposed by this type.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneBehavior DefaultCloneBehavior { get; }

Property Value

Type: CloneBehavior
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.ElementType Property

CloneTypeElementType Property
[GET] Returns the elements CloneType, if this one is an array.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneType ElementType { get; }

Property Value

Type: CloneType
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.FieldData Property

CloneTypeFieldData Property
[GET] An array of fields which are cloned.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneTypeCloneField[] FieldData { get; }

Property Value

Type: CloneTypeCloneField
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.InvestigateOwnership Property

CloneTypeInvestigateOwnership Property
[GET] Specifies whether this Type requires any ownership handling, i.e. contains children or weak references.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool InvestigateOwnership { get; }

Property Value

Type: Boolean
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.IsArray Property

CloneTypeIsArray Property
[GET] Returns whether the encapsulated Type is an array.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsArray { get; }

Property Value

Type: Boolean
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.IsMergeSurrogate Property

CloneTypeIsMergeSurrogate Property
[GET] Returns whether the cached type is handled by a merge surrogate.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsMergeSurrogate { get; }

Property Value

Type: Boolean
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.IsPlainOldData Property

CloneTypeIsPlainOldData Property
[GET] Specifies whether this Type can be considered plain old data, i.e. can be cloned by assignment.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPlainOldData { get; }

Property Value

Type: Boolean
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.PrecompiledAssignmentFunc Property

CloneTypePrecompiledAssignmentFunc Property
[GET] When available, this property returns a compiled lambda function that assigns all plain old data fields of this Type

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneTypeAssignmentFunc PrecompiledAssignmentFunc { get; }

Property Value

Type: CloneTypeAssignmentFunc
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.PrecompiledSetupFunc Property

CloneTypePrecompiledSetupFunc Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneTypeSetupFunc PrecompiledSetupFunc { get; }

Property Value

Type: CloneTypeSetupFunc
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.PrecompiledValueAssignmentFunc Property

CloneTypePrecompiledValueAssignmentFunc Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Delegate PrecompiledValueAssignmentFunc { get; }

Property Value

Type: Delegate
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.PrecompiledValueSetupFunc Property

CloneTypePrecompiledValueSetupFunc Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Delegate PrecompiledValueSetupFunc { get; }

Property Value

Type: Delegate
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.Surrogate Property

CloneTypeSurrogate Property
[GET] The surrogate that will handle this types cloning operations.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ICloneSurrogate Surrogate { get; }

Property Value

Type: ICloneSurrogate
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.Type Property

CloneTypeType Property
[GET] The Type that is described.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeInfo Type { get; }

Property Value

Type: TypeInfo
See Also

Reference

CloneType Class
Duality.Cloning Namespace


CloneType.AssignmentFunc Delegate

CloneTypeAssignmentFunc Delegate

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate void AssignmentFunc(
    Object source,
    Object target,
    ICloneOperation operation
)

Parameters

source
Type: SystemObject
target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Duality.Cloning Namespace


CloneType.CloneField Structure

CloneTypeCloneField Structure

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct CloneField

The CloneTypeCloneField type exposes the following members.

Constructors
 | Name | Description
Public method | CloneTypeCloneField | Initializes a new instance of the CloneTypeCloneField class
Top
Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Properties
 | Name | Description
Public property | Behavior |
Public property | Field |
Public property | FieldType |
Public property | Flags |
Public property | IsAlwaysReference |
Top
See Also

Reference

Duality.Cloning Namespace


CloneType.CloneField Constructor

CloneTypeCloneField Constructor
Initializes a new instance of the CloneTypeCloneField class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneField(
    FieldInfo field,
    CloneType typeInfo,
    CloneFieldFlags flags,
    CloneBehaviorAttribute behavior,
    bool isAlwaysReference
)

Parameters

field
Type: System.ReflectionFieldInfo
typeInfo
Type: Duality.CloningCloneType
flags
Type: Duality.CloningCloneFieldFlags
behavior
Type: Duality.CloningCloneBehaviorAttribute
isAlwaysReference
Type: SystemBoolean
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneField Methods

CloneField Methods

The CloneTypeCloneField type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.ToString Method

CloneTypeCloneFieldToString Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneField Properties

CloneField Properties

The CloneTypeCloneField type exposes the following members.

Properties
 | Name | Description
Public property | Behavior |
Public property | Field |
Public property | FieldType |
Public property | Flags |
Public property | IsAlwaysReference |
Top
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.Behavior Property

CloneTypeCloneFieldBehavior Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneBehaviorAttribute Behavior { get; }

Property Value

Type: CloneBehaviorAttribute
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.Field Property

CloneTypeCloneFieldField Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FieldInfo Field { get; }

Property Value

Type: FieldInfo
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.FieldType Property

CloneTypeCloneFieldFieldType Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneType FieldType { get; }

Property Value

Type: CloneType
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.Flags Property

CloneTypeCloneFieldFlags Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CloneFieldFlags Flags { get; }

Property Value

Type: CloneFieldFlags
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.CloneField.IsAlwaysReference Property

CloneTypeCloneFieldIsAlwaysReference Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAlwaysReference { get; }

Property Value

Type: Boolean
See Also

Reference

CloneTypeCloneField Structure
Duality.Cloning Namespace


CloneType.SetupFunc Delegate

CloneTypeSetupFunc Delegate

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate void SetupFunc(
    Object source,
    Object target,
    ICloneTargetSetup setup
)

Parameters

source
Type: SystemObject
target
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

Duality.Cloning Namespace


CloneType.ValueAssignmentFunc(T) Delegate

CloneTypeValueAssignmentFuncT Delegate

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate void ValueAssignmentFunc<T>(
    ref T source,
    ref T target,
    ICloneOperation operation
)
where T : struct, new()

Parameters

source
Type: T
target
Type: T
operation
Type: Duality.CloningICloneOperation

Type Parameters

T
See Also

Reference

Duality.Cloning Namespace


CloneType.ValueSetupFunc(T) Delegate

CloneTypeValueSetupFuncT Delegate

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate void ValueSetupFunc<T>(
    ref T source,
    ref T target,
    ICloneTargetSetup setup
)
where T : struct, new()

Parameters

source
Type: T
target
Type: T
setup
Type: Duality.CloningICloneTargetSetup

Type Parameters

T
See Also

Reference

Duality.Cloning Namespace


ExtMethodsCloning Class

ExtMethodsCloning Class
Inheritance Hierarchy
SystemObject
Duality.CloningExtMethodsCloning

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsCloning

The ExtMethodsCloning type exposes the following members.

Methods
Name | Description
DeepCloneT |
DeepCopyToT |
Top
See Also

Reference

Duality.Cloning Namespace


ExtMethodsCloning Methods

ExtMethodsCloning Methods

The ExtMethodsCloning type exposes the following members.

Methods
Name | Description
DeepCloneT |
DeepCopyToT |
Top
See Also

Reference

ExtMethodsCloning Class
Duality.Cloning Namespace


ExtMethodsCloning.DeepClone(T) Method

ExtMethodsCloningDeepCloneT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T DeepClone<T>(
    this T baseObj,
    CloneProviderContext context = null
)

Parameters

baseObj
Type: T
context (Optional)
Type: Duality.CloningCloneProviderContext

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsCloning Class
Duality.Cloning Namespace


ExtMethodsCloning.DeepCopyTo(T) Method

ExtMethodsCloningDeepCopyToT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void DeepCopyTo<T>(
    this T baseObj,
    T targetObj,
    CloneProviderContext context = null
)

Parameters

baseObj
Type: T
targetObj
Type: T
context (Optional)
Type: Duality.CloningCloneProviderContext

Type Parameters

T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsCloning Class
Duality.Cloning Namespace


ExtMethodsICloneOperation Class

ExtMethodsICloneOperation Class
Inheritance Hierarchy
SystemObject
Duality.CloningExtMethodsICloneOperation

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsICloneOperation
Methods
Name | Description
HandleObjectT(ICloneOperation, T, T) |
HandleObjectT(ICloneOperation, T, T, Boolean) |
Top
See Also

Reference

Duality.Cloning Namespace


ExtMethodsICloneOperation Methods

ExtMethodsICloneOperation Methods
Methods
Name | Description
HandleObjectT(ICloneOperation, T, T) |
HandleObjectT(ICloneOperation, T, T, Boolean) |
Top
See Also

Reference

ExtMethodsICloneOperation Class
Duality.Cloning Namespace


ExtMethodsICloneOperation.HandleObject Method

ExtMethodsICloneOperationHandleObject Method
Overload List
Name | Description
HandleObjectT(ICloneOperation, T, T) |
HandleObjectT(ICloneOperation, T, T, Boolean) |
Top
See Also

Reference

ExtMethodsICloneOperation Class
Duality.Cloning Namespace


ExtMethodsICloneOperation.HandleObject(T) Method (ICloneOperation, T, T)

ExtMethodsICloneOperationHandleObjectT Method (ICloneOperation, T, T)

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HandleObject<T>(
    this ICloneOperation operation,
    T source,
    T target = null
)
where T : class

Parameters

operation
Type: Duality.CloningICloneOperation
source
Type: T
target (Optional)
Type: T

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICloneOperation. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsICloneOperation Class
HandleObject Overload
Duality.Cloning Namespace


ExtMethodsICloneOperation.HandleObject(T) Method (ICloneOperation, T, T, Boolean)

ExtMethodsICloneOperationHandleObjectT Method (ICloneOperation, T, T, Boolean)

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HandleObject<T>(
    this ICloneOperation operation,
    T source,
    ref T target,
    bool dontNullifyExternal
)
where T : class

Parameters

operation
Type: Duality.CloningICloneOperation
source
Type: T
target
Type: T
dontNullifyExternal
Type: SystemBoolean

Type Parameters

T

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICloneOperation. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsICloneOperation Class
HandleObject Overload
Duality.Cloning Namespace


ICloneExplicit Interface

ICloneExplicit Interface
Provides a general interface for an object type that will provide and explicit method for cloning rather than falling back to automated cloning behavior.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICloneExplicit

The ICloneExplicit type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo | Performs the cloning copy step. In this step, all data is copied from source instances to target instances. No reference-type object instances should be created in this step, as this should be part of the setup step.
Public method | SetupCloneTargets | Performs the cloning setup step. In this step, all reference-type instances from the target object graph are generated. Not specifying a target instance for a source instance will result in handling it as a reference or weak reference, depending on the concrete case.
Top
See Also

Reference

Duality.Cloning Namespace


ICloneExplicit Methods

ICloneExplicit Methods

The ICloneExplicit type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo | Performs the cloning copy step. In this step, all data is copied from source instances to target instances. No reference-type object instances should be created in this step, as this should be part of the setup step.
Public method | SetupCloneTargets | Performs the cloning setup step. In this step, all reference-type instances from the target object graph are generated. Not specifying a target instance for a source instance will result in handling it as a reference or weak reference, depending on the concrete case.
Top
See Also

Reference

ICloneExplicit Interface
Duality.Cloning Namespace


ICloneExplicit.CopyDataTo Method

ICloneExplicitCopyDataTo Method
Performs the cloning copy step. In this step, all data is copied from source instances to target instances. No reference-type object instances should be created in this step, as this should be part of the setup step.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void CopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

ICloneExplicit Interface
Duality.Cloning Namespace


ICloneExplicit.SetupCloneTargets Method

ICloneExplicitSetupCloneTargets Method
Performs the cloning setup step. In this step, all reference-type instances from the target object graph are generated. Not specifying a target instance for a source instance will result in handling it as a reference or weak reference, depending on the concrete case.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void SetupCloneTargets(
    Object target,
    ICloneTargetSetup setup
)

Parameters

target
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
The setup environment for the cloning operation.
See Also

Reference

ICloneExplicit Interface
Duality.Cloning Namespace


ICloneOperation Interface

ICloneOperation Interface

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICloneOperation

The ICloneOperation type exposes the following members.

Methods
 | Name | Description
Public method | GetTargetT |
Public method | HandleObjectT |
Public method | HandleValueT |
Public method | IsTargetT |
Top
Extension Methods
 | Name | Description
Public Extension Method | HandleObjectT(T, T) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Public Extension Method | HandleObjectT(T, T, Boolean) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Top
Properties
 | Name | Description
Public property | Context |
Top
See Also

Reference

Duality.Cloning Namespace


ICloneOperation Methods

ICloneOperation Methods

The ICloneOperation type exposes the following members.

Methods
 | Name | Description
Public method | GetTargetT |
Public method | HandleObjectT |
Public method | HandleValueT |
Public method | IsTargetT |
Top
Extension Methods
 | Name | Description
Public Extension Method | HandleObjectT(T, T) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Public Extension Method | HandleObjectT(T, T, Boolean) | Overloaded. (Defined by ExtMethodsICloneOperation.)
Top
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation.GetTarget(T) Method

ICloneOperationGetTargetT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool GetTarget<T>(
    T source,
    ref T target
)
where T : class

Parameters

source
Type: T
target
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation.HandleObject(T) Method

ICloneOperationHandleObjectT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool HandleObject<T>(
    T source,
    ref T target
)
where T : class

Parameters

source
Type: T
target
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation.HandleValue(T) Method

ICloneOperationHandleValueT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void HandleValue<T>(
    ref T source,
    ref T target
)
where T : struct, new()

Parameters

source
Type: T
target
Type: T

Type Parameters

T
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation.IsTarget(T) Method

ICloneOperationIsTargetT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsTarget<T>(
    T target
)
where T : class

Parameters

target
Type: T

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation Properties

ICloneOperation Properties

The ICloneOperation type exposes the following members.

Properties
 | Name | Description
Public property | Context |
Top
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneOperation.Context Property

ICloneOperationContext Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
CloneProviderContext Context { get; }

Property Value

Type: CloneProviderContext
See Also

Reference

ICloneOperation Interface
Duality.Cloning Namespace


ICloneSurrogate Interface

ICloneSurrogate Interface
Clones an object instead of letting it clone itsself or using a Reflection-driven approach.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICloneSurrogate

The ICloneSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo |
Public method | LateSetup |
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type.
Public method | SetupCloneTargets |
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.
Top
See Also

Reference

Duality.Cloning Namespace
Duality.CloningCloneSurrogateT


ICloneSurrogate Methods

ICloneSurrogate Methods

The ICloneSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo |
Public method | LateSetup |
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type.
Public method | SetupCloneTargets |
Top
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.CopyDataTo Method

ICloneSurrogateCopyDataTo Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void CopyDataTo(
    Object source,
    Object target,
    ICloneOperation operation
)

Parameters

source
Type: SystemObject
target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.LateSetup Method

ICloneSurrogateLateSetup Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void LateSetup(
    Object source,
    ref Object target,
    ICloneOperation operation
)

Parameters

source
Type: SystemObject
target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.MatchesType Method

ICloneSurrogateMatchesType Method
Checks whether this surrogate is able to clone the specified object type.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo
The TypeInfo of the object in question.

Return Value

Type: Boolean
True, if this surrogate is able to clone such object, false if not.
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.SetupCloneTargets Method

ICloneSurrogateSetupCloneTargets Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void SetupCloneTargets(
    Object source,
    Object target,
    out bool requireLateSetup,
    ICloneTargetSetup setup
)

Parameters

source
Type: SystemObject
target
Type: SystemObject
requireLateSetup
Type: SystemBoolean
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate Properties

ICloneSurrogate Properties

The ICloneSurrogate type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.
Top
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.Priority Property

ICloneSurrogatePriority Property
[GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Priority { get; }

Property Value

Type: Int32
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneSurrogate.RequireMerge Property

ICloneSurrogateRequireMerge Property
[GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null.

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool RequireMerge { get; }

Property Value

Type: Boolean
See Also

Reference

ICloneSurrogate Interface
Duality.Cloning Namespace


ICloneTargetSetup Interface

ICloneTargetSetup Interface

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ICloneTargetSetup

The ICloneTargetSetup type exposes the following members.

Methods
 | Name | Description
Public method | AddTargetT |
Public method | HandleObjectT |
Public method | HandleValueT |
Top
Properties
 | Name | Description
Public property | Context |
Top
See Also

Reference

Duality.Cloning Namespace


ICloneTargetSetup Methods

ICloneTargetSetup Methods

The ICloneTargetSetup type exposes the following members.

Methods
 | Name | Description
Public method | AddTargetT |
Public method | HandleObjectT |
Public method | HandleValueT |
Top
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ICloneTargetSetup.AddTarget(T) Method

ICloneTargetSetupAddTargetT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddTarget<T>(
    T source,
    T target
)
where T : class

Parameters

source
Type: T
target
Type: T

Type Parameters

T
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ICloneTargetSetup.HandleObject(T) Method

ICloneTargetSetupHandleObjectT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void HandleObject<T>(
    T source,
    T target,
    CloneBehavior behavior = CloneBehavior.Default,
    TypeInfo behaviorTarget = null
)
where T : class

Parameters

source
Type: T
target
Type: T
behavior (Optional)
Type: Duality.CloningCloneBehavior
behaviorTarget (Optional)
Type: System.ReflectionTypeInfo

Type Parameters

T
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ICloneTargetSetup.HandleValue(T) Method

ICloneTargetSetupHandleValueT Method

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void HandleValue<T>(
    ref T source,
    ref T target,
    CloneBehavior behavior = CloneBehavior.Default,
    TypeInfo behaviorTarget = null
)
where T : struct, new()

Parameters

source
Type: T
target
Type: T
behavior (Optional)
Type: Duality.CloningCloneBehavior
behaviorTarget (Optional)
Type: System.ReflectionTypeInfo

Type Parameters

T
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ICloneTargetSetup Properties

ICloneTargetSetup Properties

The ICloneTargetSetup type exposes the following members.

Properties
 | Name | Description
Public property | Context |
Top
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ICloneTargetSetup.Context Property

ICloneTargetSetupContext Property

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
CloneProviderContext Context { get; }

Property Value

Type: CloneProviderContext
See Also

Reference

ICloneTargetSetup Interface
Duality.Cloning Namespace


ManuallyClonedAttribute Class

ManuallyClonedAttribute Class
Flags a field or class to be skipped by automatic cloning, because it has been handled by an ICloneExplicit implementation. Applying this attribute to a class has the same effect as applying it to all locally declared fields (without inheritance).
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.CloningManuallyClonedAttribute

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ManuallyClonedAttribute : Attribute

The ManuallyClonedAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | ManuallyClonedAttribute | Initializes a new instance of the ManuallyClonedAttribute class
Top
See Also

Reference

Duality.Cloning Namespace


ManuallyClonedAttribute Constructor

ManuallyClonedAttribute Constructor
Initializes a new instance of the ManuallyClonedAttribute class

Namespace: Duality.Cloning
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ManuallyClonedAttribute()
See Also

Reference

ManuallyClonedAttribute Class
Duality.Cloning Namespace


Duality.Cloning.Surrogates Namespace

Duality.Cloning.Surrogates Namespace
Classes
 | Class | Description
Public class | DelegateSurrogate |
Public class | DictionarySurrogate |


DelegateSurrogate Class

DelegateSurrogate Class
Inheritance Hierarchy
SystemObject
Duality.CloningCloneSurrogate Delegate
Duality.Cloning.SurrogatesDelegateSurrogate

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DelegateSurrogate : CloneSurrogate<Delegate>

The DelegateSurrogate type exposes the following members.

Constructors
 | Name | Description
Public method | DelegateSurrogate | Initializes a new instance of the DelegateSurrogate class
Top
Methods
 | Name | Description
Public method | CopyDataTo | (Overrides CloneSurrogateTCopyDataTo(T, T, ICloneOperation).)
Public method | CreateTargetObject | (Overrides CloneSurrogateTCreateTargetObject(T, T, ICloneTargetSetup).)
Public method | CreateTargetObjectLate | (Overrides CloneSurrogateTCreateTargetObjectLate(T, T, ICloneOperation).)
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type. (Inherited from CloneSurrogateT.)
Public method | SetupCloneTargets | (Overrides CloneSurrogateTSetupCloneTargets(T, T, ICloneTargetSetup).)
Top
Properties
 | Name | Description
Protected property | IsImmutableTarget | (Overrides CloneSurrogateTIsImmutableTarget.)
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked. (Inherited from CloneSurrogateT.)
Public property | RequireMerge | (Overrides CloneSurrogateTRequireMerge.)
Top
See Also

Reference

Duality.Cloning.Surrogates Namespace


DelegateSurrogate Constructor

DelegateSurrogate Constructor
Initializes a new instance of the DelegateSurrogate class

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DelegateSurrogate()
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate Methods

DelegateSurrogate Methods

The DelegateSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo | (Overrides CloneSurrogateTCopyDataTo(T, T, ICloneOperation).)
Public method | CreateTargetObject | (Overrides CloneSurrogateTCreateTargetObject(T, T, ICloneTargetSetup).)
Public method | CreateTargetObjectLate | (Overrides CloneSurrogateTCreateTargetObjectLate(T, T, ICloneOperation).)
Public method | MatchesType | Checks whether this surrogate is able to clone the specified object type. (Inherited from CloneSurrogateT.)
Public method | SetupCloneTargets | (Overrides CloneSurrogateTSetupCloneTargets(T, T, ICloneTargetSetup).)
Top
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.CopyDataTo Method

DelegateSurrogateCopyDataTo Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void CopyDataTo(
    Delegate source,
    Delegate target,
    ICloneOperation operation
)

Parameters

source
Type: SystemDelegate
target
Type: SystemDelegate
operation
Type: Duality.CloningICloneOperation
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.CreateTargetObject Method

DelegateSurrogateCreateTargetObject Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void CreateTargetObject(
    Delegate source,
    ref Delegate target,
    ICloneTargetSetup setup
)

Parameters

source
Type: SystemDelegate
target
Type: SystemDelegate
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.CreateTargetObjectLate Method

DelegateSurrogateCreateTargetObjectLate Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void CreateTargetObjectLate(
    Delegate source,
    ref Delegate target,
    ICloneOperation operation
)

Parameters

source
Type: SystemDelegate
target
Type: SystemDelegate
operation
Type: Duality.CloningICloneOperation
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.SetupCloneTargets Method

DelegateSurrogateSetupCloneTargets Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void SetupCloneTargets(
    Delegate source,
    Delegate target,
    ICloneTargetSetup setup
)

Parameters

source
Type: SystemDelegate
target
Type: SystemDelegate
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate Properties

DelegateSurrogate Properties

The DelegateSurrogate type exposes the following members.

Properties
 | Name | Description
Protected property | IsImmutableTarget | (Overrides CloneSurrogateTIsImmutableTarget.)
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked. (Inherited from CloneSurrogateT.)
Public property | RequireMerge | (Overrides CloneSurrogateTRequireMerge.)
Top
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.IsImmutableTarget Property

DelegateSurrogateIsImmutableTarget Property

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override bool IsImmutableTarget { get; }

Property Value

Type: Boolean
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DelegateSurrogate.RequireMerge Property

DelegateSurrogateRequireMerge Property

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool RequireMerge { get; }

Property Value

Type: Boolean

Implements

ICloneSurrogateRequireMerge
See Also

Reference

DelegateSurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate Class

DictionarySurrogate Class
Inheritance Hierarchy
SystemObject
Duality.CloningCloneSurrogate IDictionary
Duality.Cloning.SurrogatesDictionarySurrogate

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DictionarySurrogate : CloneSurrogate<IDictionary>

The DictionarySurrogate type exposes the following members.

Constructors
 | Name | Description
Public method | DictionarySurrogate | Initializes a new instance of the DictionarySurrogate class
Top
Methods
 | Name | Description
Public method | CopyDataTo | (Overrides CloneSurrogateTCopyDataTo(T, T, ICloneOperation).)
Public method | CreateTargetObject | (Inherited from CloneSurrogateT.)
Public method | CreateTargetObjectLate | (Inherited from CloneSurrogateT.)
Public method | MatchesType | (Overrides CloneSurrogateTMatchesType(TypeInfo).)
Public method | SetupCloneTargets | (Overrides CloneSurrogateTSetupCloneTargets(T, T, ICloneTargetSetup).)
Top
Properties
 | Name | Description
Protected property | IsImmutableTarget | [GET] Returns whether the surrogates client object is considered to be immutable, e.g. whether it will always be required to create a target object, even if an existing one is provided by the target object graph. (Inherited from CloneSurrogateT.)
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked. (Inherited from CloneSurrogateT.)
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null. (Inherited from CloneSurrogateT.)
Top
See Also

Reference

Duality.Cloning.Surrogates Namespace


DictionarySurrogate Constructor

DictionarySurrogate Constructor
Initializes a new instance of the DictionarySurrogate class

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DictionarySurrogate()
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate Methods

DictionarySurrogate Methods

The DictionarySurrogate type exposes the following members.

Methods
 | Name | Description
Public method | CopyDataTo | (Overrides CloneSurrogateTCopyDataTo(T, T, ICloneOperation).)
Public method | CreateTargetObject | (Inherited from CloneSurrogateT.)
Public method | CreateTargetObjectLate | (Inherited from CloneSurrogateT.)
Public method | MatchesType | (Overrides CloneSurrogateTMatchesType(TypeInfo).)
Public method | SetupCloneTargets | (Overrides CloneSurrogateTSetupCloneTargets(T, T, ICloneTargetSetup).)
Top
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate.CopyDataTo Method

DictionarySurrogateCopyDataTo Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void CopyDataTo(
    IDictionary source,
    IDictionary target,
    ICloneOperation operation
)

Parameters

source
Type: System.CollectionsIDictionary
target
Type: System.CollectionsIDictionary
operation
Type: Duality.CloningICloneOperation
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate.MatchesType Method

DictionarySurrogateMatchesType Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo

Return Value

Type: Boolean

Implements

ICloneSurrogateMatchesType(TypeInfo)
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate.SetupCloneTargets Method

DictionarySurrogateSetupCloneTargets Method

Namespace: Duality.Cloning.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void SetupCloneTargets(
    IDictionary source,
    IDictionary target,
    ICloneTargetSetup setup
)

Parameters

source
Type: System.CollectionsIDictionary
target
Type: System.CollectionsIDictionary
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


DictionarySurrogate Properties

DictionarySurrogate Properties

The DictionarySurrogate type exposes the following members.

Properties
 | Name | Description
Protected property | IsImmutableTarget | [GET] Returns whether the surrogates client object is considered to be immutable, e.g. whether it will always be required to create a target object, even if an existing one is provided by the target object graph. (Inherited from CloneSurrogateT.)
Public property | Priority | [GET] If more than one registered ISurrogate is capable of cloning a given object type, the one with the highest priority is picked. (Inherited from CloneSurrogateT.)
Public property | RequireMerge | [GET] Specifies whether the surrogates client object requires a manual merge between source and target objects, e.g. whether its manual object handling methods will be called even when the source object is null. (Inherited from CloneSurrogateT.)
Top
See Also

Reference

DictionarySurrogate Class
Duality.Cloning.Surrogates Namespace


Duality.Components Namespaces

Duality.Components Namespaces
Namespaces
Namespace | Description
Duality.Components |
Duality.Components.Diagnostics |
Duality.Components.Physics |
Duality.Components.Renderers |


Duality.Components Namespace

Duality.Components Namespace
Classes
 | Class | Description
Public class | Camera | A Camera is responsible for rendering the current Scene.
Public class | CameraPass | Describes a single pass in the overall rendering process.
Public class | DefaultRendererVisibilityStrategy | Represents the default strategy to determine which renderers are currently visible to a certain drawing device.
Public class | Renderer | A Renderer usually gives its GameObject a visual appearance in space. However, in general it may render anything and isn't bound by any conceptual restrictions.
Public class | SoundEmitter | Provides functionality to emit sound.
Public class | SoundEmitterSource | A single sound source.
Public class | SoundListener | Makes this GameObject the 3d sound listener.
Public class | Transform | Represents a GameObjects physical location in the world, relative to its Parent.
Interfaces
 | Interface | Description
Public interface | IRendererVisibilityStrategy | Represents a strategy to determine which renderers are currently visible to a certain drawing device.
Enumerations
 | Enumeration | Description
Public enumeration | TransformDirtyFlags | Flags that are used to specify, whether certain Properties have been changed.


Camera Class

Camera Class
A Camera is responsible for rendering the current Scene.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsCamera

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class Camera : Component,
    ICmpInitializable

The Camera type exposes the following members.

Constructors
 | Name | Description
Public method | Camera | Initializes a new instance of the Camera class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsCoordInView | Returns whether the specified world-space position is visible in the Cameras view space.
Public method | MakeAvailable |
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | PickRendererAt | Picks the ICmpRenderer that owns the pixel at the specified position. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.
Public method | PickRenderersIn | Picks all ICmpRenderers contained within the specified rectangular area. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.
Public method | Render | Renders the current Scene.
Public method | RenderPickingMap | Renders a picking map of the current Scene. This method needs to be called each frame a picking operation is to be performed.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | ClearColor | [GET / SET] The background color of the rendered image.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FarZ | [GET / SET] The highest Z value that can be displayed by the device.
Public property | FocusDist | [GET / SET] Reference distance for calculating the view projection. When using Parallax, an object this far away from the Camera will always appear in its original size and without offset.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | NearZ | [GET / SET] The lowest Z value that can be displayed by the device.
Public property | Passes | [GET / SET] A set of passes that describes the Cameras rendering process. Is never null nor empty.
Public property | Perspective | [GET / SET] Specified the perspective effect that is applied when rendering the world.
Public property | VisibilityMask | [GET / SET] A bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
See Also

Reference

Duality.Components Namespace


Camera Constructor

Camera Constructor
Initializes a new instance of the Camera class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Camera()
See Also

Reference

Camera Class
Duality.Components Namespace


Camera Methods

Camera Methods

The Camera type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsCoordInView | Returns whether the specified world-space position is visible in the Cameras view space.
Public method | MakeAvailable |
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | PickRendererAt | Picks the ICmpRenderer that owns the pixel at the specified position. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.
Public method | PickRenderersIn | Picks all ICmpRenderers contained within the specified rectangular area. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.
Public method | Render | Renders the current Scene.
Public method | RenderPickingMap | Renders a picking map of the current Scene. This method needs to be called each frame a picking operation is to be performed.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.GetScaleAtZ Method

CameraGetScaleAtZ Method
Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float GetScaleAtZ(
    float z
)

Parameters

z
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.GetScreenCoord Method

CameraGetScreenCoord Method
Overload List
 | Name | Description
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Top
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.GetScreenCoord Method (Vector2)

CameraGetScreenCoord Method (Vector2)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetScreenCoord(
    Vector2 spacePos
)

Parameters

spacePos
Type: DualityVector2

Return Value

Type: Vector3
See Also

Reference

Camera Class
GetScreenCoord Overload
Duality.Components Namespace


Camera.GetScreenCoord Method (Vector3)

CameraGetScreenCoord Method (Vector3)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetScreenCoord(
    Vector3 spacePos
)

Parameters

spacePos
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Camera Class
GetScreenCoord Overload
Duality.Components Namespace


Camera.GetSpaceCoord Method

CameraGetSpaceCoord Method
Overload List
 | Name | Description
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Top
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.GetSpaceCoord Method (Vector2)

CameraGetSpaceCoord Method (Vector2)
Transforms screen space coordinates to world space coordinates.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetSpaceCoord(
    Vector2 screenPos
)

Parameters

screenPos
Type: DualityVector2

Return Value

Type: Vector3
See Also

Reference

Camera Class
GetSpaceCoord Overload
Duality.Components Namespace


Camera.GetSpaceCoord Method (Vector3)

CameraGetSpaceCoord Method (Vector3)
Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetSpaceCoord(
    Vector3 screenPos
)

Parameters

screenPos
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Camera Class
GetSpaceCoord Overload
Duality.Components Namespace


Camera.IsCoordInView Method

CameraIsCoordInView Method
Returns whether the specified world-space position is visible in the Cameras view space.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsCoordInView(
    Vector3 c,
    float boundRad = 1f
)

Parameters

c
Type: DualityVector3
The position to test.
boundRad (Optional)
Type: SystemSingle
The visual bounding radius to assume for the specified position.

Return Value

Type: Boolean
True, if the position or a portion of its bounding circle is visible, false if not.
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.MakeAvailable Method

CameraMakeAvailable Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MakeAvailable()
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.PickRendererAt Method

CameraPickRendererAt Method
Picks the ICmpRenderer that owns the pixel at the specified position. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ICmpRenderer PickRendererAt(
    int x,
    int y
)

Parameters

x
Type: SystemInt32
x-Coordinate of the pixel to check.
y
Type: SystemInt32
y-Coordinate of the pixel to check.

Return Value

Type: ICmpRenderer
The ICmpRenderer that owns the pixel.
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.PickRenderersIn Method

CameraPickRenderersIn Method
Picks all ICmpRenderers contained within the specified rectangular area. The resulting information is only accurate if RenderPickingMap(Point2, Boolean) has been called this frame.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<ICmpRenderer> PickRenderersIn(
    int x,
    int y,
    int w,
    int h
)

Parameters

x
Type: SystemInt32
x-Coordinate of the Rect.
y
Type: SystemInt32
y-Coordinate of the Rect.
w
Type: SystemInt32
Width of the Rect.
h
Type: SystemInt32
Height of the Rect.

Return Value

Type: IEnumerable ICmpRenderer
A set of all ICmpRenderers that have been picked.
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.Render Method

CameraRender Method
Renders the current Scene.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Render(
    Rect viewportRect
)

Parameters

viewportRect
Type: DualityRect
The viewport area to which will be rendered.
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.RenderPickingMap Method

CameraRenderPickingMap Method
Renders a picking map of the current Scene. This method needs to be called each frame a picking operation is to be performed.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RenderPickingMap(
    Point2 viewportSize,
    bool renderOverlay
)

Parameters

viewportSize
Type: DualityPoint2
Size of the viewport area to which will be rendered.
renderOverlay
Type: SystemBoolean
Whether or not to render screen overlay renderers onto the picking target.
See Also

Reference

Camera Class
Duality.Components Namespace


Camera Properties

Camera Properties

The Camera type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | ClearColor | [GET / SET] The background color of the rendered image.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FarZ | [GET / SET] The highest Z value that can be displayed by the device.
Public property | FocusDist | [GET / SET] Reference distance for calculating the view projection. When using Parallax, an object this far away from the Camera will always appear in its original size and without offset.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | NearZ | [GET / SET] The lowest Z value that can be displayed by the device.
Public property | Passes | [GET / SET] A set of passes that describes the Cameras rendering process. Is never null nor empty.
Public property | Perspective | [GET / SET] Specified the perspective effect that is applied when rendering the world.
Public property | VisibilityMask | [GET / SET] A bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.ClearColor Property

CameraClearColor Property
[GET / SET] The background color of the rendered image.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ClearColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.FarZ Property

CameraFarZ Property
[GET / SET] The highest Z value that can be displayed by the device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FarZ { get; set; }

Property Value

Type: Single
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.FocusDist Property

CameraFocusDist Property
[GET / SET] Reference distance for calculating the view projection. When using Parallax, an object this far away from the Camera will always appear in its original size and without offset.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FocusDist { get; set; }

Property Value

Type: Single
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.NearZ Property

CameraNearZ Property
[GET / SET] The lowest Z value that can be displayed by the device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float NearZ { get; set; }

Property Value

Type: Single
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.Passes Property

CameraPasses Property
[GET / SET] A set of passes that describes the Cameras rendering process. Is never null nor empty.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<CameraPass> Passes { get; set; }

Property Value

Type: List CameraPass
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.Perspective Property

CameraPerspective Property
[GET / SET] Specified the perspective effect that is applied when rendering the world.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PerspectiveMode Perspective { get; set; }

Property Value

Type: PerspectiveMode
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.VisibilityMask Property

CameraVisibilityMask Property
[GET / SET] A bitmask flagging all visibility groups that are considered visible to this drawing device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisibilityFlag VisibilityMask { get; set; }

Property Value

Type: VisibilityFlag
See Also

Reference

Camera Class
Duality.Components Namespace


Camera.Pass Class

CameraPass Class
Describes a single pass in the overall rendering process.
Inheritance Hierarchy
SystemObject
Duality.ComponentsCameraPass

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Pass

The CameraPass type exposes the following members.

Constructors
 | Name | Description
Public method | CameraPass | Initializes a new instance of the CameraPass class
Public method | CameraPass(CameraPass) | Initializes a new instance of the CameraPass class
Public method | CameraPass(CameraPass, BatchInfo) | Initializes a new instance of the CameraPass class
Top
Methods
 | Name | Description
Public method | MakeAvailable |
Public method | ToString | (Overrides ObjectToString.)
Top
Properties
 | Name | Description
Public property | ClearColor | [GET / SET] The clear color to apply when clearing the color buffer
Public property | ClearDepth | [GET / SET] The clear depth to apply when clearing the depth buffer
Public property | ClearFlags | [GET / SET] Specifies which buffers to clean before rendering this pass
Public property | Input | The input to use for rendering. This can for example be a Texture that has been rendered to before and is now bound to perform a postprocessing step. If this is null, the current Scene is used as input - which is usually the case in the first rendering pass.
Public property | MatrixMode | [GET / SET] How to set up the coordinate space before rendering
Public property | Output | The output to render to in this pass. If this is null, the screen is used as rendering target.
Public property | VisibilityMask | [GET / SET] A Pass-local bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
Events
 | Name | Description
Public event | CollectDrawcalls | Fired when collecting drawcalls for this pass. Note that not all passes do collect drawcalls (see Input)
Top
See Also

Reference

Duality.Components Namespace


Pass Constructor

Pass Constructor
Overload List
 | Name | Description
Public method | CameraPass | Initializes a new instance of the CameraPass class
Public method | CameraPass(CameraPass) | Initializes a new instance of the CameraPass class
Public method | CameraPass(CameraPass, BatchInfo) | Initializes a new instance of the CameraPass class
Top
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass Constructor

CameraPass Constructor
Initializes a new instance of the CameraPass class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Pass()
See Also

Reference

CameraPass Class
CameraPass Overload
Duality.Components Namespace


Camera.Pass Constructor (Camera.Pass)

CameraPass Constructor (CameraPass)
Initializes a new instance of the CameraPass class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Pass(
    CameraPass copyFrom
)

Parameters

copyFrom
Type: Duality.ComponentsCameraPass
See Also

Reference

CameraPass Class
CameraPass Overload
Duality.Components Namespace


Camera.Pass Constructor (Camera.Pass, BatchInfo)

CameraPass Constructor (CameraPass, BatchInfo)
Initializes a new instance of the CameraPass class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Pass(
    CameraPass copyFrom,
    BatchInfo inputOverride
)

Parameters

copyFrom
Type: Duality.ComponentsCameraPass
inputOverride
Type: Duality.DrawingBatchInfo
See Also

Reference

CameraPass Class
CameraPass Overload
Duality.Components Namespace


Pass Methods

Pass Methods

The CameraPass type exposes the following members.

Methods
 | Name | Description
Public method | MakeAvailable |
Public method | ToString | (Overrides ObjectToString.)
Top
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.MakeAvailable Method

CameraPassMakeAvailable Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MakeAvailable()
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.ToString Method

CameraPassToString Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

CameraPass Class
Duality.Components Namespace


Pass Properties

Pass Properties

The CameraPass type exposes the following members.

Properties
 | Name | Description
Public property | ClearColor | [GET / SET] The clear color to apply when clearing the color buffer
Public property | ClearDepth | [GET / SET] The clear depth to apply when clearing the depth buffer
Public property | ClearFlags | [GET / SET] Specifies which buffers to clean before rendering this pass
Public property | Input | The input to use for rendering. This can for example be a Texture that has been rendered to before and is now bound to perform a postprocessing step. If this is null, the current Scene is used as input - which is usually the case in the first rendering pass.
Public property | MatrixMode | [GET / SET] How to set up the coordinate space before rendering
Public property | Output | The output to render to in this pass. If this is null, the screen is used as rendering target.
Public property | VisibilityMask | [GET / SET] A Pass-local bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.ClearColor Property

CameraPassClearColor Property
[GET / SET] The clear color to apply when clearing the color buffer

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ClearColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.ClearDepth Property

CameraPassClearDepth Property
[GET / SET] The clear depth to apply when clearing the depth buffer

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ClearDepth { get; set; }

Property Value

Type: Single
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.ClearFlags Property

CameraPassClearFlags Property
[GET / SET] Specifies which buffers to clean before rendering this pass

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ClearFlag ClearFlags { get; set; }

Property Value

Type: ClearFlag
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.Input Property

CameraPassInput Property
The input to use for rendering. This can for example be a Texture that has been rendered to before and is now bound to perform a postprocessing step. If this is null, the current Scene is used as input - which is usually the case in the first rendering pass.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo Input { get; set; }

Property Value

Type: BatchInfo
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.MatrixMode Property

CameraPassMatrixMode Property
[GET / SET] How to set up the coordinate space before rendering

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderMatrix MatrixMode { get; set; }

Property Value

Type: RenderMatrix
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.Output Property

CameraPassOutput Property
The output to render to in this pass. If this is null, the screen is used as rendering target.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<RenderTarget> Output { get; set; }

Property Value

Type: ContentRef RenderTarget
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.VisibilityMask Property

CameraPassVisibilityMask Property
[GET / SET] A Pass-local bitmask flagging all visibility groups that are considered visible to this drawing device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisibilityFlag VisibilityMask { get; set; }

Property Value

Type: VisibilityFlag
See Also

Reference

CameraPass Class
Duality.Components Namespace


Pass Events

Pass Events

The CameraPass type exposes the following members.

Events
 | Name | Description
Public event | CollectDrawcalls | Fired when collecting drawcalls for this pass. Note that not all passes do collect drawcalls (see Input)
Top
See Also

Reference

CameraPass Class
Duality.Components Namespace


Camera.Pass.CollectDrawcalls Event

CameraPassCollectDrawcalls Event
Fired when collecting drawcalls for this pass. Note that not all passes do collect drawcalls (see Input)

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<CollectDrawcallEventArgs> CollectDrawcalls

Value

Type: SystemEventHandler CollectDrawcallEventArgs
See Also

Reference

CameraPass Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy Class

DefaultRendererVisibilityStrategy Class
Represents the default strategy to determine which renderers are currently visible to a certain drawing device.
Inheritance Hierarchy
SystemObject
Duality.ComponentsDefaultRendererVisibilityStrategy

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DefaultRendererVisibilityStrategy : IRendererVisibilityStrategy

The DefaultRendererVisibilityStrategy type exposes the following members.

Constructors
 | Name | Description
Public method | DefaultRendererVisibilityStrategy | Initializes a new instance of the DefaultRendererVisibilityStrategy class
Top
Methods
 | Name | Description
Public method | AddRenderer |
Public method | CleanupRenderers |
Public method | QueryVisibleRenderers |
Public method | RemoveRenderer |
Public method | Update |
Top
Properties
 | Name | Description
Public property | IsRendererQuerySorted |
Top
See Also

Reference

Duality.Components Namespace


DefaultRendererVisibilityStrategy Constructor

DefaultRendererVisibilityStrategy Constructor
Initializes a new instance of the DefaultRendererVisibilityStrategy class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DefaultRendererVisibilityStrategy()
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy Methods

DefaultRendererVisibilityStrategy Methods

The DefaultRendererVisibilityStrategy type exposes the following members.

Methods
 | Name | Description
Public method | AddRenderer |
Public method | CleanupRenderers |
Public method | QueryVisibleRenderers |
Public method | RemoveRenderer |
Public method | Update |
Top
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.AddRenderer Method

DefaultRendererVisibilityStrategyAddRenderer Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddRenderer(
    ICmpRenderer renderer
)

Parameters

renderer
Type: DualityICmpRenderer

Implements

IRendererVisibilityStrategyAddRenderer(ICmpRenderer)
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.CleanupRenderers Method

DefaultRendererVisibilityStrategyCleanupRenderers Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CleanupRenderers()

Implements

IRendererVisibilityStrategyCleanupRenderers
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.QueryVisibleRenderers Method

DefaultRendererVisibilityStrategyQueryVisibleRenderers Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void QueryVisibleRenderers(
    IDrawDevice device,
    RawList<ICmpRenderer> targetList
)

Parameters

device
Type: Duality.DrawingIDrawDevice
targetList
Type: DualityRawList ICmpRenderer

Implements

IRendererVisibilityStrategyQueryVisibleRenderers(IDrawDevice, RawListICmpRenderer)
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.RemoveRenderer Method

DefaultRendererVisibilityStrategyRemoveRenderer Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveRenderer(
    ICmpRenderer renderer
)

Parameters

renderer
Type: DualityICmpRenderer

Implements

IRendererVisibilityStrategyRemoveRenderer(ICmpRenderer)
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.Update Method

DefaultRendererVisibilityStrategyUpdate Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Update()

Implements

IRendererVisibilityStrategyUpdate
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy Properties

DefaultRendererVisibilityStrategy Properties

The DefaultRendererVisibilityStrategy type exposes the following members.

Properties
 | Name | Description
Public property | IsRendererQuerySorted |
Top
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


DefaultRendererVisibilityStrategy.IsRendererQuerySorted Property

DefaultRendererVisibilityStrategyIsRendererQuerySorted Property

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsRendererQuerySorted { get; }

Property Value

Type: Boolean

Implements

IRendererVisibilityStrategyIsRendererQuerySorted
See Also

Reference

DefaultRendererVisibilityStrategy Class
Duality.Components Namespace


IRendererVisibilityStrategy Interface

IRendererVisibilityStrategy Interface
Represents a strategy to determine which renderers are currently visible to a certain drawing device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IRendererVisibilityStrategy

The IRendererVisibilityStrategy type exposes the following members.

Methods
 | Name | Description
Public method | AddRenderer | Registers a new renderer.
Public method | CleanupRenderers | Removes disposed and invalid renderers from the rendering queue.
Public method | QueryVisibleRenderers | Queries all renderers that are currently visible to the specified device.
Public method | RemoveRenderer | Removes a previously registered renderer.
Public method | Update | Updates the strategy to account for changes in the Scene after each frame update.
Top
Properties
 | Name | Description
Public property | IsRendererQuerySorted | [GET] Specifies whether the output from QueryVisibleRenderers(IDrawDevice, RawListICmpRenderer) is sorted by Component type. If it is, the system may use that information to provide more detailed profiling info that would otherwise be too time-consuming to collect.
Top
See Also

Reference

Duality.Components Namespace


IRendererVisibilityStrategy Methods

IRendererVisibilityStrategy Methods

The IRendererVisibilityStrategy type exposes the following members.

Methods
 | Name | Description
Public method | AddRenderer | Registers a new renderer.
Public method | CleanupRenderers | Removes disposed and invalid renderers from the rendering queue.
Public method | QueryVisibleRenderers | Queries all renderers that are currently visible to the specified device.
Public method | RemoveRenderer | Removes a previously registered renderer.
Public method | Update | Updates the strategy to account for changes in the Scene after each frame update.
Top
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.AddRenderer Method

IRendererVisibilityStrategyAddRenderer Method
Registers a new renderer.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddRenderer(
    ICmpRenderer renderer
)

Parameters

renderer
Type: DualityICmpRenderer
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.CleanupRenderers Method

IRendererVisibilityStrategyCleanupRenderers Method
Removes disposed and invalid renderers from the rendering queue.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void CleanupRenderers()
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.QueryVisibleRenderers Method

IRendererVisibilityStrategyQueryVisibleRenderers Method
Queries all renderers that are currently visible to the specified device.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void QueryVisibleRenderers(
    IDrawDevice device,
    RawList<ICmpRenderer> targetList
)

Parameters

device
Type: Duality.DrawingIDrawDevice
targetList
Type: DualityRawList ICmpRenderer
The list that should be updated by this method.

Return Value

Type:
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.RemoveRenderer Method

IRendererVisibilityStrategyRemoveRenderer Method
Removes a previously registered renderer.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void RemoveRenderer(
    ICmpRenderer renderer
)

Parameters

renderer
Type: DualityICmpRenderer
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.Update Method

IRendererVisibilityStrategyUpdate Method
Updates the strategy to account for changes in the Scene after each frame update.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Update()
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy Properties

IRendererVisibilityStrategy Properties

The IRendererVisibilityStrategy type exposes the following members.

Properties
 | Name | Description
Public property | IsRendererQuerySorted | [GET] Specifies whether the output from QueryVisibleRenderers(IDrawDevice, RawListICmpRenderer) is sorted by Component type. If it is, the system may use that information to provide more detailed profiling info that would otherwise be too time-consuming to collect.
Top
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


IRendererVisibilityStrategy.IsRendererQuerySorted Property

IRendererVisibilityStrategyIsRendererQuerySorted Property
[GET] Specifies whether the output from QueryVisibleRenderers(IDrawDevice, RawListICmpRenderer) is sorted by Component type. If it is, the system may use that information to provide more detailed profiling info that would otherwise be too time-consuming to collect.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsRendererQuerySorted { get; }

Property Value

Type: Boolean
See Also

Reference

IRendererVisibilityStrategy Interface
Duality.Components Namespace


Renderer Class

Renderer Class
A Renderer usually gives its GameObject a visual appearance in space. However, in general it may render anything and isn't bound by any conceptual restrictions.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsRenderer
Duality.Components.RenderersRigidBodyRenderer
Duality.Components.RenderersSpriteRenderer
Duality.Components.RenderersTextRenderer

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class Renderer : Component,
    ICmpRenderer

The Renderer type exposes the following members.

Constructors
 | Name | Description
Protected method | Renderer | Initializes a new instance of the Renderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | Performs the Renderers drawing operation.
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group.
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | BoundRadius | [GET] The Renderers bounding radius, originating from the GameObjects position.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group.
Top
See Also

Reference

Duality.Components Namespace


Renderer Constructor

Renderer Constructor
Initializes a new instance of the Renderer class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Renderer()
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer Methods

Renderer Methods

The Renderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | Performs the Renderers drawing operation.
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group.
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer.Draw Method

RendererDraw Method
Performs the Renderers drawing operation.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Implements

ICmpRendererDraw(IDrawDevice)
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer.IsVisible Method

RendererIsVisible Method
Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool IsVisible(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Return Value

Type: Boolean

Implements

ICmpRendererIsVisible(IDrawDevice)
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer.OnCopyDataTo Method

RendererOnCopyDataTo Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer Properties

Renderer Properties

The Renderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | BoundRadius | [GET] The Renderers bounding radius, originating from the GameObjects position.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group.
Top
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer.BoundRadius Property

RendererBoundRadius Property
[GET] The Renderers bounding radius, originating from the GameObjects position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract float BoundRadius { get; }

Property Value

Type: Single

Implements

ICmpRendererBoundRadius
See Also

Reference

Renderer Class
Duality.Components Namespace


Renderer.VisibilityGroup Property

RendererVisibilityGroup Property
[GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisibilityFlag VisibilityGroup { get; set; }

Property Value

Type: VisibilityFlag
See Also

Reference

Renderer Class
Duality.Components Namespace


SoundEmitter Class

SoundEmitter Class
Provides functionality to emit sound.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsSoundEmitter

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SoundEmitter : Component,
    ICmpUpdatable, ICmpInitializable, ICmpEditorUpdatable

The SoundEmitter type exposes the following members.

Constructors
 | Name | Description
Public method | SoundEmitter | Initializes a new instance of the SoundEmitter class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Sources | [GET / SET] A list of sound sources this SoundEmitter maintains. Is never null.
Top
See Also

Reference

Duality.Components Namespace


SoundEmitter Constructor

SoundEmitter Constructor
Initializes a new instance of the SoundEmitter class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundEmitter()
See Also

Reference

SoundEmitter Class
Duality.Components Namespace


SoundEmitter Methods

SoundEmitter Methods

The SoundEmitter type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

SoundEmitter Class
Duality.Components Namespace


SoundEmitter Properties

SoundEmitter Properties

The SoundEmitter type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Sources | [GET / SET] A list of sound sources this SoundEmitter maintains. Is never null.
Top
See Also

Reference

SoundEmitter Class
Duality.Components Namespace


SoundEmitter.Sources Property

SoundEmitterSources Property
[GET / SET] A list of sound sources this SoundEmitter maintains. Is never null.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<SoundEmitterSource> Sources { get; set; }

Property Value

Type: List SoundEmitterSource
See Also

Reference

SoundEmitter Class
Duality.Components Namespace


SoundEmitter.Source Class

SoundEmitterSource Class
A single sound source.
Inheritance Hierarchy
SystemObject
Duality.ComponentsSoundEmitterSource

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Source : ICloneExplicit

The SoundEmitterSource type exposes the following members.

Constructors
 | Name | Description
Public method | SoundEmitterSource | Initializes a new instance of the SoundEmitterSource class
Public method | SoundEmitterSource(ContentRefSound, Boolean) | Initializes a new instance of the SoundEmitterSource class
Public method | SoundEmitterSource(ContentRefSound, Boolean, Vector3) | Initializes a new instance of the SoundEmitterSource class
Top
Methods
 | Name | Description
Public method | Update | Updates the sound source.
Top
Properties
 | Name | Description
Public property | Instance | [GET] The SoundInstance that is currently allocated to emit this sources sound.
Public property | Looped | [GET / SET] Whether this source is looped.
Public property | Lowpass | [GET / SET] The sources lowpass factor.
Public property | Offset | [GET / SET] The 3d offset of the emitted sound relative to the GameObject.
Public property | Paused | [GET / SET] Whether this source is paused.
Public property | Pitch | [GET / SET] The sources pitch factor.
Public property | Sound | [GET / SET] The Sound that is to be played by this source.
Public property | Volume | [GET / SET] The volume of this source.
Top
See Also

Reference

Duality.Components Namespace


Source Constructor

Source Constructor
Overload List
 | Name | Description
Public method | SoundEmitterSource | Initializes a new instance of the SoundEmitterSource class
Public method | SoundEmitterSource(ContentRefSound, Boolean) | Initializes a new instance of the SoundEmitterSource class
Public method | SoundEmitterSource(ContentRefSound, Boolean, Vector3) | Initializes a new instance of the SoundEmitterSource class
Top
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source Constructor

SoundEmitterSource Constructor
Initializes a new instance of the SoundEmitterSource class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Source()
See Also

Reference

SoundEmitterSource Class
SoundEmitterSource Overload
Duality.Components Namespace


SoundEmitter.Source Constructor (ContentRef(Sound), Boolean)

SoundEmitterSource Constructor (ContentRefSound, Boolean)
Initializes a new instance of the SoundEmitterSource class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Source(
    ContentRef<Sound> snd,
    bool looped = true
)

Parameters

snd
Type: DualityContentRef Sound
looped (Optional)
Type: SystemBoolean
See Also

Reference

SoundEmitterSource Class
SoundEmitterSource Overload
Duality.Components Namespace


SoundEmitter.Source Constructor (ContentRef(Sound), Boolean, Vector3)

SoundEmitterSource Constructor (ContentRefSound, Boolean, Vector3)
Initializes a new instance of the SoundEmitterSource class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Source(
    ContentRef<Sound> snd,
    bool looped,
    Vector3 offset
)

Parameters

snd
Type: DualityContentRef Sound
looped
Type: SystemBoolean
offset
Type: DualityVector3
See Also

Reference

SoundEmitterSource Class
SoundEmitterSource Overload
Duality.Components Namespace


Source Methods

Source Methods

The SoundEmitterSource type exposes the following members.

Methods
 | Name | Description
Public method | Update | Updates the sound source.
Top
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Update Method

SoundEmitterSourceUpdate Method
Updates the sound source.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Update(
    SoundEmitter emitter
)

Parameters

emitter
Type: Duality.ComponentsSoundEmitter
The sources parent SoundEmitter.

Return Value

Type: Boolean
True, if the source is still active. False, if it requests to be removed.
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


Source Properties

Source Properties

The SoundEmitterSource type exposes the following members.

Properties
 | Name | Description
Public property | Instance | [GET] The SoundInstance that is currently allocated to emit this sources sound.
Public property | Looped | [GET / SET] Whether this source is looped.
Public property | Lowpass | [GET / SET] The sources lowpass factor.
Public property | Offset | [GET / SET] The 3d offset of the emitted sound relative to the GameObject.
Public property | Paused | [GET / SET] Whether this source is paused.
Public property | Pitch | [GET / SET] The sources pitch factor.
Public property | Sound | [GET / SET] The Sound that is to be played by this source.
Public property | Volume | [GET / SET] The volume of this source.
Top
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Instance Property

SoundEmitterSourceInstance Property
[GET] The SoundInstance that is currently allocated to emit this sources sound.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundInstance Instance { get; }

Property Value

Type: SoundInstance
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Looped Property

SoundEmitterSourceLooped Property
[GET / SET] Whether this source is looped.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Looped { get; set; }

Property Value

Type: Boolean
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Lowpass Property

SoundEmitterSourceLowpass Property
[GET / SET] The sources lowpass factor.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Lowpass { get; set; }

Property Value

Type: Single
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Offset Property

SoundEmitterSourceOffset Property
[GET / SET] The 3d offset of the emitted sound relative to the GameObject.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Offset { get; set; }

Property Value

Type: Vector3
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Paused Property

SoundEmitterSourcePaused Property
[GET / SET] Whether this source is paused.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Paused { get; set; }

Property Value

Type: Boolean
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Pitch Property

SoundEmitterSourcePitch Property
[GET / SET] The sources pitch factor.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Pitch { get; set; }

Property Value

Type: Single
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Sound Property

SoundEmitterSourceSound Property
[GET / SET] The Sound that is to be played by this source.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Sound> Sound { get; set; }

Property Value

Type: ContentRef Sound
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundEmitter.Source.Volume Property

SoundEmitterSourceVolume Property
[GET / SET] The volume of this source.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Volume { get; set; }

Property Value

Type: Single
See Also

Reference

SoundEmitterSource Class
Duality.Components Namespace


SoundListener Class

SoundListener Class
Makes this GameObject the 3d sound listener.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsSoundListener

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SoundListener : Component,
    ICmpInitializable

The SoundListener type exposes the following members.

Constructors
 | Name | Description
Public method | SoundListener | Initializes a new instance of the SoundListener class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | MakeCurrent |
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Top
See Also

Reference

Duality.Components Namespace


SoundListener Constructor

SoundListener Constructor
Initializes a new instance of the SoundListener class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundListener()
See Also

Reference

SoundListener Class
Duality.Components Namespace


SoundListener Methods

SoundListener Methods

The SoundListener type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | MakeCurrent |
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

SoundListener Class
Duality.Components Namespace


SoundListener.MakeCurrent Method

SoundListenerMakeCurrent Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MakeCurrent()
See Also

Reference

SoundListener Class
Duality.Components Namespace


SoundListener Properties

SoundListener Properties

The SoundListener type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Top
See Also

Reference

SoundListener Class
Duality.Components Namespace


Transform Class

Transform Class
Represents a GameObjects physical location in the world, relative to its Parent.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsTransform

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class Transform : Component,
    ICmpUpdatable, ICmpEditorUpdatable, ICmpInitializable

The Transform type exposes the following members.

Constructors
 | Name | Description
Public method | Transform | Initializes a new instance of the Transform class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CommitChanges | Checks whether transform values have been changed, clears the changelist and fires the appropriate events
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetLocalPoint(Vector2) | Calculates a Transform-local coordinate from a world coordinate.
Public method | GetLocalPoint(Vector3) | Calculates a Transform-local coordinate from a world coordinate.
Public method | GetLocalVector(Vector2) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Public method | GetLocalVector(Vector3) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Public method | GetLocalVelocityAt(Vector2) | Calculates the Transforms local velocity at a given local coordinate;
Public method | GetLocalVelocityAt(Vector3) | Calculates the Transforms local velocity at a given local coordinate;
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | GetWorldPoint(Vector2) | Calculates a world coordinate from a Transform-local coordinate.
Public method | GetWorldPoint(Vector3) | Calculates a world coordinate from a Transform-local coordinate.
Public method | GetWorldVector(Vector2) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Public method | GetWorldVector(Vector3) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Public method | GetWorldVelocityAt(Vector2) | Calculates the Transforms world velocity at a given world coordinate;
Public method | GetWorldVelocityAt(Vector3) | Calculates the Transforms world velocity at a given world coordinate;
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | MoveBy(Vector2) | Moves the object by the given vector. This will affect the Transforms velocity value.
Public method | MoveBy(Vector3) | Moves the object by the given vector. This will affect the Transforms velocity value.
Public method | MoveByAbs(Vector2) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Public method | MoveByAbs(Vector3) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Public method | MoveTo(Vector2) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Public method | MoveTo(Vector3) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Public method | MoveToAbs(Vector2) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Public method | MoveToAbs(Vector3) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | SetRelativeTransform(Transform) | Updates the Transforms data all at once.
Public method | SetRelativeTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Public method | SetTransform(Transform) | Updates the Transforms data all at once.
Public method | SetTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Public method | ToString | (Inherited from Component.)
Public method | TurnBy | Turns the object by the given radian angle. This will affect the Transforms angular velocity value.
Public method | TurnTo | Turns the object to the given relative radian angle. This will affect the Transforms angular velocity value.
Public method | TurnToAbs | Turns the object to the given absolute radian angle. This will affect the Transforms angular velocity value.
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Angle | [GET / SET] The objects angle / rotation, in radians.
Public property | AngleVel | [GET] The objects angle / rotation velocity, in radians.
Public property | DeriveAngle | [GET / SET] If false, this objects rotation values aren't relative to its parent. However, its position, velocity, etc. still depend on parent rotation.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Forward | [GET] The objects forward vector.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IgnoreParent | [GET / SET] Specifies whether the Transform component should ignore its parent transform.
Public property | Pos | [GET / SET] The objects position.
Public property | RelativeAngle | [GET / SET] The objects angle / rotation relative to its parent object, in radians.
Public property | RelativeAngleVel | [GET / SET] The objects angle / rotation velocity relative to its parent object, in radians.
Public property | RelativeForward | [GET] The objects forward vector, relative to its parent object.
Public property | RelativePos | [GET / SET] The objects position relative to its parent object.
Public property | RelativeRight | [GET] The objects right (directional) vector, relative to its parent object.
Public property | RelativeScale | [GET / SET] The objects scale relative to its parent object.
Public property | RelativeVel | [GET / SET] The objects velocity relative to its parent object.
Public property | Right | [GET] The objects right (directional) vector.
Public property | Scale | [GET / SET] The objects scale.
Public property | Vel | [GET] The objects velocity.
Top
Events
 | Name | Description
Public event | EventTransformChanged |
Top
See Also

Reference

Duality.Components Namespace


Transform Constructor

Transform Constructor
Initializes a new instance of the Transform class

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Transform()
See Also

Reference

Transform Class
Duality.Components Namespace


Transform Methods

Transform Methods

The Transform type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CommitChanges | Checks whether transform values have been changed, clears the changelist and fires the appropriate events
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetLocalPoint(Vector2) | Calculates a Transform-local coordinate from a world coordinate.
Public method | GetLocalPoint(Vector3) | Calculates a Transform-local coordinate from a world coordinate.
Public method | GetLocalVector(Vector2) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Public method | GetLocalVector(Vector3) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Public method | GetLocalVelocityAt(Vector2) | Calculates the Transforms local velocity at a given local coordinate;
Public method | GetLocalVelocityAt(Vector3) | Calculates the Transforms local velocity at a given local coordinate;
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | GetWorldPoint(Vector2) | Calculates a world coordinate from a Transform-local coordinate.
Public method | GetWorldPoint(Vector3) | Calculates a world coordinate from a Transform-local coordinate.
Public method | GetWorldVector(Vector2) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Public method | GetWorldVector(Vector3) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Public method | GetWorldVelocityAt(Vector2) | Calculates the Transforms world velocity at a given world coordinate;
Public method | GetWorldVelocityAt(Vector3) | Calculates the Transforms world velocity at a given world coordinate;
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | MoveBy(Vector2) | Moves the object by the given vector. This will affect the Transforms velocity value.
Public method | MoveBy(Vector3) | Moves the object by the given vector. This will affect the Transforms velocity value.
Public method | MoveByAbs(Vector2) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Public method | MoveByAbs(Vector3) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Public method | MoveTo(Vector2) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Public method | MoveTo(Vector3) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Public method | MoveToAbs(Vector2) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Public method | MoveToAbs(Vector3) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | SetRelativeTransform(Transform) | Updates the Transforms data all at once.
Public method | SetRelativeTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Public method | SetTransform(Transform) | Updates the Transforms data all at once.
Public method | SetTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Public method | ToString | (Inherited from Component.)
Public method | TurnBy | Turns the object by the given radian angle. This will affect the Transforms angular velocity value.
Public method | TurnTo | Turns the object to the given relative radian angle. This will affect the Transforms angular velocity value.
Public method | TurnToAbs | Turns the object to the given absolute radian angle. This will affect the Transforms angular velocity value.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.CommitChanges Method

TransformCommitChanges Method
Checks whether transform values have been changed, clears the changelist and fires the appropriate events

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CommitChanges(
    Component sender = null
)

Parameters

sender (Optional)
Type: DualityComponent
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetLocalPoint Method

TransformGetLocalPoint Method
Overload List
 | Name | Description
Public method | GetLocalPoint(Vector2) | Calculates a Transform-local coordinate from a world coordinate.
Public method | GetLocalPoint(Vector3) | Calculates a Transform-local coordinate from a world coordinate.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetLocalPoint Method (Vector2)

TransformGetLocalPoint Method (Vector2)
Calculates a Transform-local coordinate from a world coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetLocalPoint(
    Vector2 world
)

Parameters

world
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetLocalPoint Overload
Duality.Components Namespace


Transform.GetLocalPoint Method (Vector3)

TransformGetLocalPoint Method (Vector3)
Calculates a Transform-local coordinate from a world coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetLocalPoint(
    Vector3 world
)

Parameters

world
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetLocalPoint Overload
Duality.Components Namespace


Transform.GetLocalVector Method

TransformGetLocalVector Method
Overload List
 | Name | Description
Public method | GetLocalVector(Vector2) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Public method | GetLocalVector(Vector3) | Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetLocalVector Method (Vector2)

TransformGetLocalVector Method (Vector2)
Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetLocalVector(
    Vector2 local
)

Parameters

local
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetLocalVector Overload
Duality.Components Namespace


Transform.GetLocalVector Method (Vector3)

TransformGetLocalVector Method (Vector3)
Calculates a Transform-local vector from a world vector. Does only take scale and rotation into account, but not position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetLocalVector(
    Vector3 world
)

Parameters

world
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetLocalVector Overload
Duality.Components Namespace


Transform.GetLocalVelocityAt Method

TransformGetLocalVelocityAt Method
Overload List
 | Name | Description
Public method | GetLocalVelocityAt(Vector2) | Calculates the Transforms local velocity at a given local coordinate;
Public method | GetLocalVelocityAt(Vector3) | Calculates the Transforms local velocity at a given local coordinate;
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetLocalVelocityAt Method (Vector2)

TransformGetLocalVelocityAt Method (Vector2)
Calculates the Transforms local velocity at a given local coordinate;

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetLocalVelocityAt(
    Vector2 world
)

Parameters

world
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetLocalVelocityAt Overload
Duality.Components Namespace


Transform.GetLocalVelocityAt Method (Vector3)

TransformGetLocalVelocityAt Method (Vector3)
Calculates the Transforms local velocity at a given local coordinate;

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetLocalVelocityAt(
    Vector3 local
)

Parameters

local
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetLocalVelocityAt Overload
Duality.Components Namespace


Transform.GetWorldPoint Method

TransformGetWorldPoint Method
Overload List
 | Name | Description
Public method | GetWorldPoint(Vector2) | Calculates a world coordinate from a Transform-local coordinate.
Public method | GetWorldPoint(Vector3) | Calculates a world coordinate from a Transform-local coordinate.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetWorldPoint Method (Vector2)

TransformGetWorldPoint Method (Vector2)
Calculates a world coordinate from a Transform-local coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetWorldPoint(
    Vector2 local
)

Parameters

local
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetWorldPoint Overload
Duality.Components Namespace


Transform.GetWorldPoint Method (Vector3)

TransformGetWorldPoint Method (Vector3)
Calculates a world coordinate from a Transform-local coordinate.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetWorldPoint(
    Vector3 local
)

Parameters

local
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetWorldPoint Overload
Duality.Components Namespace


Transform.GetWorldVector Method

TransformGetWorldVector Method
Overload List
 | Name | Description
Public method | GetWorldVector(Vector2) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Public method | GetWorldVector(Vector3) | Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetWorldVector Method (Vector2)

TransformGetWorldVector Method (Vector2)
Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetWorldVector(
    Vector2 local
)

Parameters

local
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetWorldVector Overload
Duality.Components Namespace


Transform.GetWorldVector Method (Vector3)

TransformGetWorldVector Method (Vector3)
Calculates a world vector from a Transform-local vector. Does only take scale and rotation into account, but not position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetWorldVector(
    Vector3 local
)

Parameters

local
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetWorldVector Overload
Duality.Components Namespace


Transform.GetWorldVelocityAt Method

TransformGetWorldVelocityAt Method
Overload List
 | Name | Description
Public method | GetWorldVelocityAt(Vector2) | Calculates the Transforms world velocity at a given world coordinate;
Public method | GetWorldVelocityAt(Vector3) | Calculates the Transforms world velocity at a given world coordinate;
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.GetWorldVelocityAt Method (Vector2)

TransformGetWorldVelocityAt Method (Vector2)
Calculates the Transforms world velocity at a given world coordinate;

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GetWorldVelocityAt(
    Vector2 world
)

Parameters

world
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

Transform Class
GetWorldVelocityAt Overload
Duality.Components Namespace


Transform.GetWorldVelocityAt Method (Vector3)

TransformGetWorldVelocityAt Method (Vector3)
Calculates the Transforms world velocity at a given world coordinate;

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetWorldVelocityAt(
    Vector3 world
)

Parameters

world
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

Transform Class
GetWorldVelocityAt Overload
Duality.Components Namespace


Transform.MoveBy Method

TransformMoveBy Method
Overload List
 | Name | Description
Public method | MoveBy(Vector2) | Moves the object by the given vector. This will affect the Transforms velocity value.
Public method | MoveBy(Vector3) | Moves the object by the given vector. This will affect the Transforms velocity value.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.MoveBy Method (Vector2)

TransformMoveBy Method (Vector2)
Moves the object by the given vector. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveBy(
    Vector2 value
)

Parameters

value
Type: DualityVector2
See Also

Reference

Transform Class
MoveBy Overload
Duality.Components Namespace


Transform.MoveBy Method (Vector3)

TransformMoveBy Method (Vector3)
Moves the object by the given vector. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveBy(
    Vector3 value
)

Parameters

value
Type: DualityVector3
See Also

Reference

Transform Class
MoveBy Overload
Duality.Components Namespace


Transform.MoveByAbs Method

TransformMoveByAbs Method
Overload List
 | Name | Description
Public method | MoveByAbs(Vector2) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Public method | MoveByAbs(Vector3) | Moves the object by given absolute vector. This will affect the Transforms velocity value.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.MoveByAbs Method (Vector2)

TransformMoveByAbs Method (Vector2)
Moves the object by given absolute vector. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveByAbs(
    Vector2 value
)

Parameters

value
Type: DualityVector2
See Also

Reference

Transform Class
MoveByAbs Overload
Duality.Components Namespace


Transform.MoveByAbs Method (Vector3)

TransformMoveByAbs Method (Vector3)
Moves the object by given absolute vector. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveByAbs(
    Vector3 value
)

Parameters

value
Type: DualityVector3
See Also

Reference

Transform Class
MoveByAbs Overload
Duality.Components Namespace


Transform.MoveTo Method

TransformMoveTo Method
Overload List
 | Name | Description
Public method | MoveTo(Vector2) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Public method | MoveTo(Vector3) | Moves the object to the given relative position. This will affect the Transforms velocity value.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.MoveTo Method (Vector2)

TransformMoveTo Method (Vector2)
Moves the object to the given relative position. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveTo(
    Vector2 value
)

Parameters

value
Type: DualityVector2
See Also

Reference

Transform Class
MoveTo Overload
Duality.Components Namespace


Transform.MoveTo Method (Vector3)

TransformMoveTo Method (Vector3)
Moves the object to the given relative position. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveTo(
    Vector3 value
)

Parameters

value
Type: DualityVector3
See Also

Reference

Transform Class
MoveTo Overload
Duality.Components Namespace


Transform.MoveToAbs Method

TransformMoveToAbs Method
Overload List
 | Name | Description
Public method | MoveToAbs(Vector2) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Public method | MoveToAbs(Vector3) | Moves the object to the given absolute position. This will affect the Transforms velocity value.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.MoveToAbs Method (Vector2)

TransformMoveToAbs Method (Vector2)
Moves the object to the given absolute position. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveToAbs(
    Vector2 value
)

Parameters

value
Type: DualityVector2
See Also

Reference

Transform Class
MoveToAbs Overload
Duality.Components Namespace


Transform.MoveToAbs Method (Vector3)

TransformMoveToAbs Method (Vector3)
Moves the object to the given absolute position. This will affect the Transforms velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MoveToAbs(
    Vector3 value
)

Parameters

value
Type: DualityVector3
See Also

Reference

Transform Class
MoveToAbs Overload
Duality.Components Namespace


Transform.OnCopyDataTo Method

TransformOnCopyDataTo Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.OnSetupCloneTargets Method

TransformOnSetupCloneTargets Method

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSetupCloneTargets(
    Object targetObj,
    ICloneTargetSetup setup
)

Parameters

targetObj
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.SetRelativeTransform Method

TransformSetRelativeTransform Method
Overload List
 | Name | Description
Public method | SetRelativeTransform(Transform) | Updates the Transforms data all at once.
Public method | SetRelativeTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.SetRelativeTransform Method (Transform)

TransformSetRelativeTransform Method (Transform)
Updates the Transforms data all at once.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetRelativeTransform(
    Transform other
)

Parameters

other
Type: Duality.ComponentsTransform
See Also

Reference

Transform Class
SetRelativeTransform Overload
Duality.Components Namespace


Transform.SetRelativeTransform Method (Vector3, Single, Single)

TransformSetRelativeTransform Method (Vector3, Single, Single)
Updates the Transforms data all at once.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetRelativeTransform(
    Vector3 pos,
    float scale,
    float angle
)

Parameters

pos
Type: DualityVector3
scale
Type: SystemSingle
angle
Type: SystemSingle
See Also

Reference

Transform Class
SetRelativeTransform Overload
Duality.Components Namespace


Transform.SetTransform Method

TransformSetTransform Method
Overload List
 | Name | Description
Public method | SetTransform(Transform) | Updates the Transforms data all at once.
Public method | SetTransform(Vector3, Single, Single) | Updates the Transforms data all at once.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.SetTransform Method (Transform)

TransformSetTransform Method (Transform)
Updates the Transforms data all at once.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetTransform(
    Transform other
)

Parameters

other
Type: Duality.ComponentsTransform
See Also

Reference

Transform Class
SetTransform Overload
Duality.Components Namespace


Transform.SetTransform Method (Vector3, Single, Single)

TransformSetTransform Method (Vector3, Single, Single)
Updates the Transforms data all at once.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetTransform(
    Vector3 pos,
    float scale,
    float angle
)

Parameters

pos
Type: DualityVector3
scale
Type: SystemSingle
angle
Type: SystemSingle
See Also

Reference

Transform Class
SetTransform Overload
Duality.Components Namespace


Transform.TurnBy Method

TransformTurnBy Method
Turns the object by the given radian angle. This will affect the Transforms angular velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void TurnBy(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.TurnTo Method

TransformTurnTo Method
Turns the object to the given relative radian angle. This will affect the Transforms angular velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void TurnTo(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.TurnToAbs Method

TransformTurnToAbs Method
Turns the object to the given absolute radian angle. This will affect the Transforms angular velocity value.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void TurnToAbs(
    float value
)

Parameters

value
Type: SystemSingle
See Also

Reference

Transform Class
Duality.Components Namespace


Transform Properties

Transform Properties

The Transform type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Angle | [GET / SET] The objects angle / rotation, in radians.
Public property | AngleVel | [GET] The objects angle / rotation velocity, in radians.
Public property | DeriveAngle | [GET / SET] If false, this objects rotation values aren't relative to its parent. However, its position, velocity, etc. still depend on parent rotation.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Forward | [GET] The objects forward vector.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IgnoreParent | [GET / SET] Specifies whether the Transform component should ignore its parent transform.
Public property | Pos | [GET / SET] The objects position.
Public property | RelativeAngle | [GET / SET] The objects angle / rotation relative to its parent object, in radians.
Public property | RelativeAngleVel | [GET / SET] The objects angle / rotation velocity relative to its parent object, in radians.
Public property | RelativeForward | [GET] The objects forward vector, relative to its parent object.
Public property | RelativePos | [GET / SET] The objects position relative to its parent object.
Public property | RelativeRight | [GET] The objects right (directional) vector, relative to its parent object.
Public property | RelativeScale | [GET / SET] The objects scale relative to its parent object.
Public property | RelativeVel | [GET / SET] The objects velocity relative to its parent object.
Public property | Right | [GET] The objects right (directional) vector.
Public property | Scale | [GET / SET] The objects scale.
Public property | Vel | [GET] The objects velocity.
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Angle Property

TransformAngle Property
[GET / SET] The objects angle / rotation, in radians.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Angle { get; set; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.AngleVel Property

TransformAngleVel Property
[GET] The objects angle / rotation velocity, in radians.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AngleVel { get; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.DeriveAngle Property

TransformDeriveAngle Property
[GET / SET] If false, this objects rotation values aren't relative to its parent. However, its position, velocity, etc. still depend on parent rotation.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool DeriveAngle { get; set; }

Property Value

Type: Boolean
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Forward Property

TransformForward Property
[GET] The objects forward vector.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Forward { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.IgnoreParent Property

TransformIgnoreParent Property
[GET / SET] Specifies whether the Transform component should ignore its parent transform.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IgnoreParent { get; set; }

Property Value

Type: Boolean
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Pos Property

TransformPos Property
[GET / SET] The objects position.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeAngle Property

TransformRelativeAngle Property
[GET / SET] The objects angle / rotation relative to its parent object, in radians.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RelativeAngle { get; set; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeAngleVel Property

TransformRelativeAngleVel Property
[GET / SET] The objects angle / rotation velocity relative to its parent object, in radians.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RelativeAngleVel { get; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeForward Property

TransformRelativeForward Property
[GET] The objects forward vector, relative to its parent object.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 RelativeForward { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativePos Property

TransformRelativePos Property
[GET / SET] The objects position relative to its parent object.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 RelativePos { get; set; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeRight Property

TransformRelativeRight Property
[GET] The objects right (directional) vector, relative to its parent object.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 RelativeRight { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeScale Property

TransformRelativeScale Property
[GET / SET] The objects scale relative to its parent object.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RelativeScale { get; set; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.RelativeVel Property

TransformRelativeVel Property
[GET / SET] The objects velocity relative to its parent object.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 RelativeVel { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Right Property

TransformRight Property
[GET] The objects right (directional) vector.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Right { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Scale Property

TransformScale Property
[GET / SET] The objects scale.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Scale { get; set; }

Property Value

Type: Single
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.Vel Property

TransformVel Property
[GET] The objects velocity.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Vel { get; }

Property Value

Type: Vector3
See Also

Reference

Transform Class
Duality.Components Namespace


Transform Events

Transform Events

The Transform type exposes the following members.

Events
 | Name | Description
Public event | EventTransformChanged |
Top
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.EventTransformChanged Event

TransformEventTransformChanged Event

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<TransformChangedEventArgs> EventTransformChanged

Value

Type: SystemEventHandler TransformChangedEventArgs
See Also

Reference

Transform Class
Duality.Components Namespace


Transform.DirtyFlags Enumeration

TransformDirtyFlags Enumeration
Flags that are used to specify, whether certain Properties have been changed.

Namespace: Duality.Components
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum DirtyFlags
Members
Member name | Value | Description
None | 0 |
Pos | 1 |
Angle | 4 |
Scale | 16 |
All | 21 |
See Also

Reference

Duality.Components Namespace


Duality.Components.Diagnostics Namespace

Duality.Components.Diagnostics Namespace
Classes
 | Class | Description
Public class | ProfileRenderer | A diagnostic Component that displays current performance measurements and other profiling stats.
Public class | VisualLogRenderer |


ProfileRenderer Class

ProfileRenderer Class
A diagnostic Component that displays current performance measurements and other profiling stats.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.Components.DiagnosticsProfileRenderer

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ProfileRenderer : Component,
    ICmpRenderer, ICmpUpdatable

The ProfileRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | ProfileRenderer | Initializes a new instance of the ProfileRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | CounterGraphs | [GET / SET] The names of ProfileCounter instances that should be drawn in graph form.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | DrawGraphs | [GET / SET] Whether or not CounterGraphs are drawn.
Public property | DrawPerfTextReport | [GET / SET] Whether or not a text report of the current time profiling results is drawn.
Public property | DrawStatTextReport | [GET / SET] Whether or not a text report of the current stat profiling results is drawn.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | KeyToggleGraphs | [GET / SET] A key that can be used to toggle the display of realtime graphs.
Public property | KeyTogglePerfText | [GET / SET] A key that can be used to toggle performance text reports.
Public property | KeyToggleStatText | [GET / SET] A key that can be used to toggle profiling stat text reports.
Public property | Options | [GET / SET] A bitmask that specifies which report features are used.
Public property | UpdateInterval | [GET / SET] The time interval in milliseconds by which the report is updated.
Top
See Also

Reference

Duality.Components.Diagnostics Namespace


ProfileRenderer Constructor

ProfileRenderer Constructor
Initializes a new instance of the ProfileRenderer class

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ProfileRenderer()
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer Methods

ProfileRenderer Methods

The ProfileRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer Properties

ProfileRenderer Properties

The ProfileRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | CounterGraphs | [GET / SET] The names of ProfileCounter instances that should be drawn in graph form.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | DrawGraphs | [GET / SET] Whether or not CounterGraphs are drawn.
Public property | DrawPerfTextReport | [GET / SET] Whether or not a text report of the current time profiling results is drawn.
Public property | DrawStatTextReport | [GET / SET] Whether or not a text report of the current stat profiling results is drawn.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | KeyToggleGraphs | [GET / SET] A key that can be used to toggle the display of realtime graphs.
Public property | KeyTogglePerfText | [GET / SET] A key that can be used to toggle performance text reports.
Public property | KeyToggleStatText | [GET / SET] A key that can be used to toggle profiling stat text reports.
Public property | Options | [GET / SET] A bitmask that specifies which report features are used.
Public property | UpdateInterval | [GET / SET] The time interval in milliseconds by which the report is updated.
Top
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.CounterGraphs Property

ProfileRendererCounterGraphs Property
[GET / SET] The names of ProfileCounter instances that should be drawn in graph form.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<string> CounterGraphs { get; set; }

Property Value

Type: List String
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.DrawGraphs Property

ProfileRendererDrawGraphs Property
[GET / SET] Whether or not CounterGraphs are drawn.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool DrawGraphs { get; set; }

Property Value

Type: Boolean
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.DrawPerfTextReport Property

ProfileRendererDrawPerfTextReport Property
[GET / SET] Whether or not a text report of the current time profiling results is drawn.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool DrawPerfTextReport { get; set; }

Property Value

Type: Boolean
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.DrawStatTextReport Property

ProfileRendererDrawStatTextReport Property
[GET / SET] Whether or not a text report of the current stat profiling results is drawn.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool DrawStatTextReport { get; set; }

Property Value

Type: Boolean
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.KeyToggleGraphs Property

ProfileRendererKeyToggleGraphs Property
[GET / SET] A key that can be used to toggle the display of realtime graphs.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Key KeyToggleGraphs { get; set; }

Property Value

Type: Key
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.KeyTogglePerfText Property

ProfileRendererKeyTogglePerfText Property
[GET / SET] A key that can be used to toggle performance text reports.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Key KeyTogglePerfText { get; set; }

Property Value

Type: Key
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.KeyToggleStatText Property

ProfileRendererKeyToggleStatText Property
[GET / SET] A key that can be used to toggle profiling stat text reports.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Key KeyToggleStatText { get; set; }

Property Value

Type: Key
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.Options Property

ProfileRendererOptions Property
[GET / SET] A bitmask that specifies which report features are used.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ProfileReportOptions Options { get; set; }

Property Value

Type: ProfileReportOptions
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


ProfileRenderer.UpdateInterval Property

ProfileRendererUpdateInterval Property
[GET / SET] The time interval in milliseconds by which the report is updated.

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int UpdateInterval { get; set; }

Property Value

Type: Int32
See Also

Reference

ProfileRenderer Class
Duality.Components.Diagnostics Namespace


VisualLogRenderer Class

VisualLogRenderer Class
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.Components.DiagnosticsVisualLogRenderer

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class VisualLogRenderer : Component,
    ICmpRenderer, ICmpInitializable

The VisualLogRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | VisualLogRenderer | Initializes a new instance of the VisualLogRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Top
See Also

Reference

Duality.Components.Diagnostics Namespace


VisualLogRenderer Constructor

VisualLogRenderer Constructor
Initializes a new instance of the VisualLogRenderer class

Namespace: Duality.Components.Diagnostics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisualLogRenderer()
See Also

Reference

VisualLogRenderer Class
Duality.Components.Diagnostics Namespace


VisualLogRenderer Methods

VisualLogRenderer Methods

The VisualLogRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Component) operation for custom Component Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Component.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

VisualLogRenderer Class
Duality.Components.Diagnostics Namespace


VisualLogRenderer Properties

VisualLogRenderer Properties

The VisualLogRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Top
See Also

Reference

VisualLogRenderer Class
Duality.Components.Diagnostics Namespace


Duality.Components.Physics Namespace

Duality.Components.Physics Namespace
Classes
 | Class | Description
Public class | AngleJointInfo | Constrains two RigidBodies to a fixed relative angle
Public class | ChainShapeInfo | Describes a double-sided edge chain in a RigidBody shape.
Public class | CircleShapeInfo | Describes a Colliders circle shape.
Public class | DistanceJointInfo | Constrains two RigidBodies to obtain a fixed distance to each other
Public class | FrictionJointInfo | Applies relative friction to RigidBodies.
Public class | GearJointInfo | Connects two bodies using a gear. The gear type is determined by the joints that are attached to each body. Supported joint types are (Fixed)Prismatic- and (Fixed)Revolutejoints. Those joints are required to be either fixed or attached to a static body.
Public class | JointInfo | Describes a RigidBody joint. Joints limit a Colliders degree of freedom by connecting it to fixed world coordinates or other Colliders.
Public class | LineJointInfo | The line joint is also called "wheel joint", because it behaves like the spring of a car tire: A body is only allowed to travel on a specific world axis relative to the other one but can rotate freely or accelerated by a motor.
Public class | LoopShapeInfo | Describes a double-sided edge loop (outline) in a RigidBody shape.
Public class | PolyShapeInfo | Describes a Colliders polygon shape.
Public class | PrismaticJointInfo | This joint allows the RigidBody to travel on a specific axis relative to another body. It can be limited to a certain area and driven by a motor force.
Public class | PulleyJointInfo | Constrains two RigidBodies as though connected using a rope that is fixed at two world anchor points.
Public class | RevoluteJointInfo | Pins two locally anchored RigidBodies together without constraining rotation.
Public class | RigidBody | Represents a body instance for physical simulation, collision detection and response.
Public class | RigidBodyCollisionEventArgs |
Public class | RopeJointInfo | Constrains two RigidBodies to not exceed a maximum distance to each other.
Public class | ShapeInfo | Describes a Colliders primitive shape. A Colliders overall shape may be combined of any number of primitive shapes.
Public class | SliderJointInfo | Constrains two RigidBodies to keep their distance to each other in a certain range. You can view this as a massless, rigid rod.
Public class | WeldJointInfo | "Welds" two Colliders together so they share a common point and relative angle.
Structures
 | Structure | Description
Public structure | CollisionFilterData |
Public structure | RayCastData | Provides data about a RigidBody RayCast.
Delegates
 | Delegate | Description
Public delegate | CollisionFilter | Determines whether a collision is allowed to occur.
Public delegate | RayCastCallback | Called for each shape found in the query. You control how the ray cast proceeds by returning a float.
Enumerations
 | Enumeration | Description
Public enumeration | BodyType | The type of a Colliders physical body.
Public enumeration | CollisionCategory |


AngleJointInfo Class

AngleJointInfo Class
Constrains two RigidBodies to a fixed relative angle
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsAngleJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class AngleJointInfo : JointInfo

The AngleJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | AngleJointInfo | Initializes a new instance of the AngleJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BiasFactor | [GET / SET] The bias factor determines how strong the joint reacts to the difference between target and actual angle.
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | MaxImpulse | [GET / SET] The maximum angular impulse to apply to the RigidBody. A negative value equals infinity.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Softness | [GET / SET] The softness of the joint determines how easy it is to turn it away from its ideal angle.
Public property | TargetAngle | [GET / SET] The Colliders target angle.
Top
See Also

Reference

Duality.Components.Physics Namespace


AngleJointInfo Constructor

AngleJointInfo Constructor
Initializes a new instance of the AngleJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AngleJointInfo()
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo Fields

AngleJointInfo Fields

The AngleJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo Methods

AngleJointInfo Methods

The AngleJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo.CreateJoint Method

AngleJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo Properties

AngleJointInfo Properties

The AngleJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BiasFactor | [GET / SET] The bias factor determines how strong the joint reacts to the difference between target and actual angle.
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | MaxImpulse | [GET / SET] The maximum angular impulse to apply to the RigidBody. A negative value equals infinity.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Softness | [GET / SET] The softness of the joint determines how easy it is to turn it away from its ideal angle.
Public property | TargetAngle | [GET / SET] The Colliders target angle.
Top
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo.BiasFactor Property

AngleJointInfoBiasFactor Property
[GET / SET] The bias factor determines how strong the joint reacts to the difference between target and actual angle.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float BiasFactor { get; set; }

Property Value

Type: Single
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo.MaxImpulse Property

AngleJointInfoMaxImpulse Property
[GET / SET] The maximum angular impulse to apply to the RigidBody. A negative value equals infinity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxImpulse { get; set; }

Property Value

Type: Single
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo.Softness Property

AngleJointInfoSoftness Property
[GET / SET] The softness of the joint determines how easy it is to turn it away from its ideal angle.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Softness { get; set; }

Property Value

Type: Single
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


AngleJointInfo.TargetAngle Property

AngleJointInfoTargetAngle Property
[GET / SET] The Colliders target angle.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TargetAngle { get; set; }

Property Value

Type: Single
See Also

Reference

AngleJointInfo Class
Duality.Components.Physics Namespace


BodyType Enumeration

BodyType Enumeration
The type of a Colliders physical body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum BodyType
Members
Member name | Value | Description
Static | 0 | A static body will never move due to physical forces.
Dynamic | 1 | A dynamic body's movement is determined by physical effects.
Kinematic | 2 | A kinematic body can push around dynamic bodies, but is itself unaffected by physical influences due to collisions. It can't collide with static bodies. Use with caution.
See Also

Reference

Duality.Components.Physics Namespace


ChainShapeInfo Class

ChainShapeInfo Class
Describes a double-sided edge chain in a RigidBody shape.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsShapeInfo
Duality.Components.PhysicsChainShapeInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class ChainShapeInfo : ShapeInfo

The ChainShapeInfo type exposes the following members.

Constructors
 | Name | Description
Public method | ChainShapeInfo | Initializes a new instance of the ChainShapeInfo class
Public method | ChainShapeInfo(IEnumerableVector2) | Initializes a new instance of the ChainShapeInfo class
Top
Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The edge chains vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

Duality.Components.Physics Namespace


ChainShapeInfo Constructor

ChainShapeInfo Constructor
Overload List
 | Name | Description
Public method | ChainShapeInfo | Initializes a new instance of the ChainShapeInfo class
Public method | ChainShapeInfo(IEnumerableVector2) | Initializes a new instance of the ChainShapeInfo class
Top
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo Constructor

ChainShapeInfo Constructor
Initializes a new instance of the ChainShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ChainShapeInfo()
See Also

Reference

ChainShapeInfo Class
ChainShapeInfo Overload
Duality.Components.Physics Namespace


ChainShapeInfo Constructor (IEnumerable(Vector2))

ChainShapeInfo Constructor (IEnumerableVector2)
Initializes a new instance of the ChainShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ChainShapeInfo(
    IEnumerable<Vector2> vertices
)

Parameters

vertices
Type: System.Collections.GenericIEnumerable Vector2
See Also

Reference

ChainShapeInfo Class
ChainShapeInfo Overload
Duality.Components.Physics Namespace


ChainShapeInfo Fields

ChainShapeInfo Fields

The ChainShapeInfo type exposes the following members.

Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo Methods

ChainShapeInfo Methods

The ChainShapeInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo.CreateFixture Method

ChainShapeInfoCreateFixture Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Fixture CreateFixture(
    Body body
)

Parameters

body
Type: Body

Return Value

Type: Fixture
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo Properties

ChainShapeInfo Properties

The ChainShapeInfo type exposes the following members.

Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The edge chains vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo.AABB Property

ChainShapeInfoAABB Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Rect AABB { get; }

Property Value

Type: Rect
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


ChainShapeInfo.Vertices Property

ChainShapeInfoVertices Property
[GET / SET] The edge chains vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2[] Vertices { get; set; }

Property Value

Type: Vector2
See Also

Reference

ChainShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo Class

CircleShapeInfo Class
Describes a Colliders circle shape.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsShapeInfo
Duality.Components.PhysicsCircleShapeInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class CircleShapeInfo : ShapeInfo

The CircleShapeInfo type exposes the following members.

Constructors
 | Name | Description
Public method | CircleShapeInfo | Initializes a new instance of the CircleShapeInfo class
Public method | CircleShapeInfo(Single, Vector2, Single) | Initializes a new instance of the CircleShapeInfo class
Top
Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Position | [GET / SET] The circles position.
Public property | Radius | [GET / SET] The circles radius.
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Top
See Also

Reference

Duality.Components.Physics Namespace


CircleShapeInfo Constructor

CircleShapeInfo Constructor
Overload List
 | Name | Description
Public method | CircleShapeInfo | Initializes a new instance of the CircleShapeInfo class
Public method | CircleShapeInfo(Single, Vector2, Single) | Initializes a new instance of the CircleShapeInfo class
Top
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo Constructor

CircleShapeInfo Constructor
Initializes a new instance of the CircleShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CircleShapeInfo()
See Also

Reference

CircleShapeInfo Class
CircleShapeInfo Overload
Duality.Components.Physics Namespace


CircleShapeInfo Constructor (Single, Vector2, Single)

CircleShapeInfo Constructor (Single, Vector2, Single)
Initializes a new instance of the CircleShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CircleShapeInfo(
    float radius,
    Vector2 position,
    float density
)

Parameters

radius
Type: SystemSingle
position
Type: DualityVector2
density
Type: SystemSingle
See Also

Reference

CircleShapeInfo Class
CircleShapeInfo Overload
Duality.Components.Physics Namespace


CircleShapeInfo Fields

CircleShapeInfo Fields

The CircleShapeInfo type exposes the following members.

Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo Methods

CircleShapeInfo Methods

The CircleShapeInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo.CreateFixture Method

CircleShapeInfoCreateFixture Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Fixture CreateFixture(
    Body body
)

Parameters

body
Type: Body

Return Value

Type: Fixture
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo Properties

CircleShapeInfo Properties

The CircleShapeInfo type exposes the following members.

Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Position | [GET / SET] The circles position.
Public property | Radius | [GET / SET] The circles radius.
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Top
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo.AABB Property

CircleShapeInfoAABB Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Rect AABB { get; }

Property Value

Type: Rect
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo.Position Property

CircleShapeInfoPosition Property
[GET / SET] The circles position.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Position { get; set; }

Property Value

Type: Vector2
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CircleShapeInfo.Radius Property

CircleShapeInfoRadius Property
[GET / SET] The circles radius.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Radius { get; set; }

Property Value

Type: Single
See Also

Reference

CircleShapeInfo Class
Duality.Components.Physics Namespace


CollisionCategory Enumeration

CollisionCategory Enumeration

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum CollisionCategory
Members
Member name | Value | Description
None | 0 |
Cat1 | 1 |
Cat2 | 2 |
Cat3 | 4 |
Cat4 | 8 |
Cat5 | 16 |
Cat6 | 32 |
Cat7 | 64 |
Cat8 | 128 |
Cat9 | 256 |
Cat10 | 512 |
Cat11 | 1024 |
Cat12 | 2048 |
Cat13 | 4096 |
Cat14 | 8192 |
Cat15 | 16384 |
Cat16 | 32768 |
Cat17 | 65536 |
Cat18 | 131072 |
Cat19 | 262144 |
Cat20 | 524288 |
Cat21 | 1048576 |
Cat22 | 2097152 |
Cat23 | 4194304 |
Cat24 | 8388608 |
Cat25 | 16777216 |
Cat26 | 33554432 |
Cat27 | 67108864 |
Cat28 | 134217728 |
Cat29 | 268435456 |
Cat30 | 536870912 |
Cat31 | 1073741824 |
All | 2147483647 |
See Also

Reference

Duality.Components.Physics Namespace


CollisionFilter Delegate

CollisionFilter Delegate
Determines whether a collision is allowed to occur.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate bool CollisionFilter(
    CollisionFilterData collision
)

Parameters

collision
Type: Duality.Components.PhysicsCollisionFilterData
The collision that is about to occur.

Return Value

Type: Boolean
True, if the collision is valid. False, if the collision should be ignored.
See Also

Reference

Duality.Components.Physics Namespace


CollisionFilterData Structure

CollisionFilterData Structure

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct CollisionFilterData

The CollisionFilterData type exposes the following members.

Constructors
 | Name | Description
Public method | CollisionFilterData | Initializes a new instance of the CollisionFilterData class
Top
Properties
 | Name | Description
Public property | MyBody |
Public property | MyGameObj |
Public property | MyShape |
Public property | OtherBody |
Public property | OtherGameObj |
Public property | OtherShape |
Top
See Also

Reference

Duality.Components.Physics Namespace


CollisionFilterData Constructor

CollisionFilterData Constructor
Initializes a new instance of the CollisionFilterData class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionFilterData(
    GameObject myObj,
    GameObject otherObj,
    ShapeInfo myShape,
    ShapeInfo otherShape
)

Parameters

myObj
Type: DualityGameObject
otherObj
Type: DualityGameObject
myShape
Type: Duality.Components.PhysicsShapeInfo
otherShape
Type: Duality.Components.PhysicsShapeInfo
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData Properties

CollisionFilterData Properties

The CollisionFilterData type exposes the following members.

Properties
 | Name | Description
Public property | MyBody |
Public property | MyGameObj |
Public property | MyShape |
Public property | OtherBody |
Public property | OtherGameObj |
Public property | OtherShape |
Top
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.MyBody Property

CollisionFilterDataMyBody Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody MyBody { get; }

Property Value

Type: RigidBody
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.MyGameObj Property

CollisionFilterDataMyGameObj Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject MyGameObj { get; }

Property Value

Type: GameObject
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.MyShape Property

CollisionFilterDataMyShape Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo MyShape { get; }

Property Value

Type: ShapeInfo
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.OtherBody Property

CollisionFilterDataOtherBody Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody OtherBody { get; }

Property Value

Type: RigidBody
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.OtherGameObj Property

CollisionFilterDataOtherGameObj Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject OtherGameObj { get; }

Property Value

Type: GameObject
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


CollisionFilterData.OtherShape Property

CollisionFilterDataOtherShape Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo OtherShape { get; }

Property Value

Type: ShapeInfo
See Also

Reference

CollisionFilterData Structure
Duality.Components.Physics Namespace


DistanceJointInfo Class

DistanceJointInfo Class
Constrains two RigidBodies to obtain a fixed distance to each other
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsDistanceJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class DistanceJointInfo : JointInfo

The DistanceJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | DistanceJointInfo | Initializes a new instance of the DistanceJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | DampingRatio | [GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | Frequency | [GET / SET] The mass spring damper frequency in hertz.
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | TargetDistance | [GET / SET] The target distance between local and world anchor
Top
See Also

Reference

Duality.Components.Physics Namespace


DistanceJointInfo Constructor

DistanceJointInfo Constructor
Initializes a new instance of the DistanceJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DistanceJointInfo()
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo Fields

DistanceJointInfo Fields

The DistanceJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo Methods

DistanceJointInfo Methods

The DistanceJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.CreateJoint Method

DistanceJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo Properties

DistanceJointInfo Properties

The DistanceJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | DampingRatio | [GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | Frequency | [GET / SET] The mass spring damper frequency in hertz.
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | TargetDistance | [GET / SET] The target distance between local and world anchor
Top
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.DampingRatio Property

DistanceJointInfoDampingRatio Property
[GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float DampingRatio { get; set; }

Property Value

Type: Single
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.Frequency Property

DistanceJointInfoFrequency Property
[GET / SET] The mass spring damper frequency in hertz.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Frequency { get; set; }

Property Value

Type: Single
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.LocalAnchorA Property

DistanceJointInfoLocalAnchorA Property
[GET / SET] The first bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.LocalAnchorB Property

DistanceJointInfoLocalAnchorB Property
[GET / SET] The second bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


DistanceJointInfo.TargetDistance Property

DistanceJointInfoTargetDistance Property
[GET / SET] The target distance between local and world anchor

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TargetDistance { get; set; }

Property Value

Type: Single
See Also

Reference

DistanceJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo Class

FrictionJointInfo Class
Applies relative friction to RigidBodies.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsFrictionJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class FrictionJointInfo : JointInfo

The FrictionJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | FrictionJointInfo | Initializes a new instance of the FrictionJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first RigidBodys local anchor point.
Public property | LocalAnchorB | [GET / SET] The second RigidBodys local anchor point.
Public property | MaxForce | [GET / SET] The maximum friction force in the local anchor point.
Public property | MaxTorque | [GET / SET] The maximum friction torque in the local anchor point.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

Duality.Components.Physics Namespace


FrictionJointInfo Constructor

FrictionJointInfo Constructor
Initializes a new instance of the FrictionJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FrictionJointInfo()
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo Fields

FrictionJointInfo Fields

The FrictionJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo Methods

FrictionJointInfo Methods

The FrictionJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo.CreateJoint Method

FrictionJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo Properties

FrictionJointInfo Properties

The FrictionJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first RigidBodys local anchor point.
Public property | LocalAnchorB | [GET / SET] The second RigidBodys local anchor point.
Public property | MaxForce | [GET / SET] The maximum friction force in the local anchor point.
Public property | MaxTorque | [GET / SET] The maximum friction torque in the local anchor point.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo.LocalAnchorA Property

FrictionJointInfoLocalAnchorA Property
[GET / SET] The first RigidBodys local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo.LocalAnchorB Property

FrictionJointInfoLocalAnchorB Property
[GET / SET] The second RigidBodys local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo.MaxForce Property

FrictionJointInfoMaxForce Property
[GET / SET] The maximum friction force in the local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxForce { get; set; }

Property Value

Type: Single
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


FrictionJointInfo.MaxTorque Property

FrictionJointInfoMaxTorque Property
[GET / SET] The maximum friction torque in the local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxTorque { get; set; }

Property Value

Type: Single
See Also

Reference

FrictionJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo Class

GearJointInfo Class
Connects two bodies using a gear. The gear type is determined by the joints that are attached to each body. Supported joint types are (Fixed)Prismatic- and (Fixed)Revolutejoints. Those joints are required to be either fixed or attached to a static body.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsGearJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class GearJointInfo : JointInfo

The GearJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | GearJointInfo | Initializes a new instance of the GearJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Ratio | [GET / SET] The gear ratio by which body movement is connected.
Top
See Also

Reference

Duality.Components.Physics Namespace


GearJointInfo Constructor

GearJointInfo Constructor
Initializes a new instance of the GearJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GearJointInfo()
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo Fields

GearJointInfo Fields

The GearJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo Methods

GearJointInfo Methods

The GearJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo.CreateJoint Method

GearJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo Properties

GearJointInfo Properties

The GearJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Ratio | [GET / SET] The gear ratio by which body movement is connected.
Top
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


GearJointInfo.Ratio Property

GearJointInfoRatio Property
[GET / SET] The gear ratio by which body movement is connected.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Ratio { get; set; }

Property Value

Type: Single
See Also

Reference

GearJointInfo Class
Duality.Components.Physics Namespace


JointInfo Class

JointInfo Class
Describes a RigidBody joint. Joints limit a Colliders degree of freedom by connecting it to fixed world coordinates or other Colliders.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
More...

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class JointInfo

The JointInfo type exposes the following members.

Constructors
 | Name | Description
Protected method | JointInfo | Initializes a new instance of the JointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint |
 | GetDualityPoint |
 | GetFarseerPoint |
Top
Fields
 | Name | Description
Protected field | joint |
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value.
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other.
Public property | Disposed |
Public property | Enabled | [GET / SET] Whether or not the joint is active.
Public property | OtherBody |
Public property | ParentBody |
Top
See Also

Reference

Duality.Components.Physics Namespace
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsAngleJointInfo
Duality.Components.PhysicsDistanceJointInfo
Duality.Components.PhysicsFrictionJointInfo
Duality.Components.PhysicsGearJointInfo
Duality.Components.PhysicsLineJointInfo
Duality.Components.PhysicsPrismaticJointInfo
Duality.Components.PhysicsPulleyJointInfo
Duality.Components.PhysicsRevoluteJointInfo
Duality.Components.PhysicsRopeJointInfo
Duality.Components.PhysicsSliderJointInfo
Duality.Components.PhysicsWeldJointInfo


JointInfo Constructor

JointInfo Constructor
Initializes a new instance of the JointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected JointInfo()
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo Fields

JointInfo Fields

The JointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint |
Top
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.joint Field

JointInfojoint Field

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected internal Joint joint

Field Value

Type: Joint
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo Methods

JointInfo Methods

The JointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint |
 | GetDualityPoint |
 | GetFarseerPoint |
Top
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.CreateJoint Method

JointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract Joint CreateJoint(
    Body parentBody,
    Body otherBody
)

Parameters

parentBody
Type: Body
otherBody
Type: Body

Return Value

Type: Joint
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.GetDualityPoint Method

JointInfoGetDualityPoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected static Vector2 GetDualityPoint(
    RigidBody c,
    Vector2 farseerPoint
)

Parameters

c
Type: Duality.Components.PhysicsRigidBody
farseerPoint
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.GetFarseerPoint Method

JointInfoGetFarseerPoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected static Vector2 GetFarseerPoint(
    RigidBody c,
    Vector2 dualityPoint
)

Parameters

c
Type: Duality.Components.PhysicsRigidBody
dualityPoint
Type: DualityVector2

Return Value

Type: Vector2
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo Properties

JointInfo Properties

The JointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value.
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other.
Public property | Disposed |
Public property | Enabled | [GET / SET] Whether or not the joint is active.
Public property | OtherBody |
Public property | ParentBody |
Top
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.BreakPoint Property

JointInfoBreakPoint Property
[GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float BreakPoint { get; set; }

Property Value

Type: Single
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.CollideConnected Property

JointInfoCollideConnected Property
[GET / SET] Specifies whether the connected Colliders will collide with each other.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool CollideConnected { get; set; }

Property Value

Type: Boolean
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.Disposed Property

JointInfoDisposed Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.Enabled Property

JointInfoEnabled Property
[GET / SET] Whether or not the joint is active.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Enabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.OtherBody Property

JointInfoOtherBody Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody OtherBody { get; }

Property Value

Type: RigidBody
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


JointInfo.ParentBody Property

JointInfoParentBody Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody ParentBody { get; }

Property Value

Type: RigidBody
See Also

Reference

JointInfo Class
Duality.Components.Physics Namespace


LineJointInfo Class

LineJointInfo Class
The line joint is also called "wheel joint", because it behaves like the spring of a car tire: A body is only allowed to travel on a specific world axis relative to the other one but can rotate freely or accelerated by a motor.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsLineJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class LineJointInfo : JointInfo

The LineJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | LineJointInfo | Initializes a new instance of the LineJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CarAnchor | [GET / SET] The car RigidBodies local anchor point.
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | DampingRatio | [GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | Frequency | [GET / SET] The mass spring damper frequency in hertz.
Public property | JointSpeed | [GET] The current joint angle speed in radians per frame.
Public property | JointTranslation | [GET] The current joint translation.
Public property | MaxMotorTorque | [GET / SET] The maximum motor torque.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorSpeed | [GET / SET] The desired motor speed in radians per frame.
Public property | MotorTorque | [GET] The current joint motor torque.
Public property | MovementAxis | [GET / SET] The axis on which the body may move.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | WheelAnchor | [GET / SET] The wheel RigidBodies local anchor point.
Top
See Also

Reference

Duality.Components.Physics Namespace


LineJointInfo Constructor

LineJointInfo Constructor
Initializes a new instance of the LineJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public LineJointInfo()
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo Fields

LineJointInfo Fields

The LineJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo Methods

LineJointInfo Methods

The LineJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.CreateJoint Method

LineJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo Properties

LineJointInfo Properties

The LineJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CarAnchor | [GET / SET] The car RigidBodies local anchor point.
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | DampingRatio | [GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | Frequency | [GET / SET] The mass spring damper frequency in hertz.
Public property | JointSpeed | [GET] The current joint angle speed in radians per frame.
Public property | JointTranslation | [GET] The current joint translation.
Public property | MaxMotorTorque | [GET / SET] The maximum motor torque.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorSpeed | [GET / SET] The desired motor speed in radians per frame.
Public property | MotorTorque | [GET] The current joint motor torque.
Public property | MovementAxis | [GET / SET] The axis on which the body may move.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | WheelAnchor | [GET / SET] The wheel RigidBodies local anchor point.
Top
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.CarAnchor Property

LineJointInfoCarAnchor Property
[GET / SET] The car RigidBodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 CarAnchor { get; set; }

Property Value

Type: Vector2
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.DampingRatio Property

LineJointInfoDampingRatio Property
[GET / SET] The damping ratio. Zero means "no damping", one means "critical damping".

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float DampingRatio { get; set; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.Frequency Property

LineJointInfoFrequency Property
[GET / SET] The mass spring damper frequency in hertz.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Frequency { get; set; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.JointSpeed Property

LineJointInfoJointSpeed Property
[GET] The current joint angle speed in radians per frame.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointSpeed { get; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.JointTranslation Property

LineJointInfoJointTranslation Property
[GET] The current joint translation.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointTranslation { get; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.MaxMotorTorque Property

LineJointInfoMaxMotorTorque Property
[GET / SET] The maximum motor torque.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxMotorTorque { get; set; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.MotorEnabled Property

LineJointInfoMotorEnabled Property
[GET / SET] Is the joint motor enabled?

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool MotorEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.MotorSpeed Property

LineJointInfoMotorSpeed Property
[GET / SET] The desired motor speed in radians per frame.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorSpeed { get; set; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.MotorTorque Property

LineJointInfoMotorTorque Property
[GET] The current joint motor torque.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorTorque { get; }

Property Value

Type: Single
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.MovementAxis Property

LineJointInfoMovementAxis Property
[GET / SET] The axis on which the body may move.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MovementAxis { get; set; }

Property Value

Type: Vector2
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LineJointInfo.WheelAnchor Property

LineJointInfoWheelAnchor Property
[GET / SET] The wheel RigidBodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 WheelAnchor { get; set; }

Property Value

Type: Vector2
See Also

Reference

LineJointInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo Class

LoopShapeInfo Class
Describes a double-sided edge loop (outline) in a RigidBody shape.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsShapeInfo
Duality.Components.PhysicsLoopShapeInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class LoopShapeInfo : ShapeInfo

The LoopShapeInfo type exposes the following members.

Constructors
 | Name | Description
Public method | LoopShapeInfo | Initializes a new instance of the LoopShapeInfo class
Public method | LoopShapeInfo(IEnumerableVector2) | Initializes a new instance of the LoopShapeInfo class
Top
Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The edge loops vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

Duality.Components.Physics Namespace


LoopShapeInfo Constructor

LoopShapeInfo Constructor
Overload List
 | Name | Description
Public method | LoopShapeInfo | Initializes a new instance of the LoopShapeInfo class
Public method | LoopShapeInfo(IEnumerableVector2) | Initializes a new instance of the LoopShapeInfo class
Top
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo Constructor

LoopShapeInfo Constructor
Initializes a new instance of the LoopShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public LoopShapeInfo()
See Also

Reference

LoopShapeInfo Class
LoopShapeInfo Overload
Duality.Components.Physics Namespace


LoopShapeInfo Constructor (IEnumerable(Vector2))

LoopShapeInfo Constructor (IEnumerableVector2)
Initializes a new instance of the LoopShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public LoopShapeInfo(
    IEnumerable<Vector2> vertices
)

Parameters

vertices
Type: System.Collections.GenericIEnumerable Vector2
See Also

Reference

LoopShapeInfo Class
LoopShapeInfo Overload
Duality.Components.Physics Namespace


LoopShapeInfo Fields

LoopShapeInfo Fields

The LoopShapeInfo type exposes the following members.

Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
Top
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo Methods

LoopShapeInfo Methods

The LoopShapeInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo.CreateFixture Method

LoopShapeInfoCreateFixture Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Fixture CreateFixture(
    Body body
)

Parameters

body
Type: Body

Return Value

Type: Fixture
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo Properties

LoopShapeInfo Properties

The LoopShapeInfo type exposes the following members.

Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The edge loops vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo.AABB Property

LoopShapeInfoAABB Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Rect AABB { get; }

Property Value

Type: Rect
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


LoopShapeInfo.Vertices Property

LoopShapeInfoVertices Property
[GET / SET] The edge loops vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2[] Vertices { get; set; }

Property Value

Type: Vector2
See Also

Reference

LoopShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo Class

PolyShapeInfo Class
Describes a Colliders polygon shape.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsShapeInfo
Duality.Components.PhysicsPolyShapeInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class PolyShapeInfo : ShapeInfo

The PolyShapeInfo type exposes the following members.

Constructors
 | Name | Description
Public method | PolyShapeInfo | Initializes a new instance of the PolyShapeInfo class
Public method | PolyShapeInfo(IEnumerableVector2, Single) | Initializes a new instance of the PolyShapeInfo class
Top
Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
 | MaxVertices |
Top
Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The polygons vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

Duality.Components.Physics Namespace


PolyShapeInfo Constructor

PolyShapeInfo Constructor
Overload List
 | Name | Description
Public method | PolyShapeInfo | Initializes a new instance of the PolyShapeInfo class
Public method | PolyShapeInfo(IEnumerableVector2, Single) | Initializes a new instance of the PolyShapeInfo class
Top
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo Constructor

PolyShapeInfo Constructor
Initializes a new instance of the PolyShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PolyShapeInfo()
See Also

Reference

PolyShapeInfo Class
PolyShapeInfo Overload
Duality.Components.Physics Namespace


PolyShapeInfo Constructor (IEnumerable(Vector2), Single)

PolyShapeInfo Constructor (IEnumerableVector2, Single)
Initializes a new instance of the PolyShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PolyShapeInfo(
    IEnumerable<Vector2> vertices,
    float density
)

Parameters

vertices
Type: System.Collections.GenericIEnumerable Vector2
density
Type: SystemSingle
See Also

Reference

PolyShapeInfo Class
PolyShapeInfo Overload
Duality.Components.Physics Namespace


PolyShapeInfo Fields

PolyShapeInfo Fields

The PolyShapeInfo type exposes the following members.

Fields
 | Name | Description
Protected field | fixture | (Inherited from ShapeInfo.)
 | MaxVertices |
Top
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo.MaxVertices Field

PolyShapeInfoMaxVertices Field

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int MaxVertices

Field Value

Type: Int32
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo Methods

PolyShapeInfo Methods

The PolyShapeInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateFixture | (Overrides ShapeInfoCreateFixture(Body).)
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties. (Inherited from ShapeInfo.)
Top
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo.CreateFixture Method

PolyShapeInfoCreateFixture Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Fixture CreateFixture(
    Body body
)

Parameters

body
Type: Body

Return Value

Type: Fixture
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo Properties

PolyShapeInfo Properties

The PolyShapeInfo type exposes the following members.

Properties
 | Name | Description
Public property | AABB | (Overrides ShapeInfoAABB.)
Public property | Density | [GET / SET] The shapes density. (Inherited from ShapeInfo.)
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction. (Inherited from ShapeInfo.)
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body. (Inherited from ShapeInfo.)
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation (Inherited from ShapeInfo.)
Public property | Parent | [GET] The shape's parent RigidBody. (Inherited from ShapeInfo.)
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0. (Inherited from ShapeInfo.)
Public property | Vertices | [GET / SET] The polygons vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.
Top
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo.AABB Property

PolyShapeInfoAABB Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Rect AABB { get; }

Property Value

Type: Rect
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PolyShapeInfo.Vertices Property

PolyShapeInfoVertices Property
[GET / SET] The polygons vertices. While assinging the array will cause an automatic update, simply modifying it will require you to call UpdateShape manually.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2[] Vertices { get; set; }

Property Value

Type: Vector2
See Also

Reference

PolyShapeInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo Class

PrismaticJointInfo Class
This joint allows the RigidBody to travel on a specific axis relative to another body. It can be limited to a certain area and driven by a motor force.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsPrismaticJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class PrismaticJointInfo : JointInfo

The PrismaticJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | PrismaticJointInfo | Initializes a new instance of the PrismaticJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | JointSpeed | [GET] The current joint speed.
Public property | JointTranslation | [GET] The current joint translation.
Public property | LimitEnabled | [GET / SET] Is the joint limited in its movement?
Public property | LocalAnchorA | [GET / SET] The local anchor point on the first RigidBody.
Public property | LocalAnchorB | [GET / SET] The local anchor point on the second RigidBody.
Public property | LowerLimit | [GET / SET] The lower joint limit.
Public property | MaxMotorForce | [GET / SET] The maximum motor force.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorForce | [GET] The current joint motor force.
Public property | MotorSpeed | [GET / SET] The desired motor speed.
Public property | MovementAxis | [GET / SET] The axis on which the body may move.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | ReferenceAngle | [GET / SET] The reference angle that is used to constrain the bodies angle.
Public property | UpperLimit | [GET / SET] The upper joint limit.
Top
See Also

Reference

Duality.Components.Physics Namespace


PrismaticJointInfo Constructor

PrismaticJointInfo Constructor
Initializes a new instance of the PrismaticJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrismaticJointInfo()
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo Fields

PrismaticJointInfo Fields

The PrismaticJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo Methods

PrismaticJointInfo Methods

The PrismaticJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.CreateJoint Method

PrismaticJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo Properties

PrismaticJointInfo Properties

The PrismaticJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | JointSpeed | [GET] The current joint speed.
Public property | JointTranslation | [GET] The current joint translation.
Public property | LimitEnabled | [GET / SET] Is the joint limited in its movement?
Public property | LocalAnchorA | [GET / SET] The local anchor point on the first RigidBody.
Public property | LocalAnchorB | [GET / SET] The local anchor point on the second RigidBody.
Public property | LowerLimit | [GET / SET] The lower joint limit.
Public property | MaxMotorForce | [GET / SET] The maximum motor force.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorForce | [GET] The current joint motor force.
Public property | MotorSpeed | [GET / SET] The desired motor speed.
Public property | MovementAxis | [GET / SET] The axis on which the body may move.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | ReferenceAngle | [GET / SET] The reference angle that is used to constrain the bodies angle.
Public property | UpperLimit | [GET / SET] The upper joint limit.
Top
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.JointSpeed Property

PrismaticJointInfoJointSpeed Property
[GET] The current joint speed.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointSpeed { get; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.JointTranslation Property

PrismaticJointInfoJointTranslation Property
[GET] The current joint translation.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointTranslation { get; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.LimitEnabled Property

PrismaticJointInfoLimitEnabled Property
[GET / SET] Is the joint limited in its movement?

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool LimitEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.LocalAnchorA Property

PrismaticJointInfoLocalAnchorA Property
[GET / SET] The local anchor point on the first RigidBody.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.LocalAnchorB Property

PrismaticJointInfoLocalAnchorB Property
[GET / SET] The local anchor point on the second RigidBody.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.LowerLimit Property

PrismaticJointInfoLowerLimit Property
[GET / SET] The lower joint limit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LowerLimit { get; set; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.MaxMotorForce Property

PrismaticJointInfoMaxMotorForce Property
[GET / SET] The maximum motor force.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxMotorForce { get; set; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.MotorEnabled Property

PrismaticJointInfoMotorEnabled Property
[GET / SET] Is the joint motor enabled?

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool MotorEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.MotorForce Property

PrismaticJointInfoMotorForce Property
[GET] The current joint motor force.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorForce { get; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.MotorSpeed Property

PrismaticJointInfoMotorSpeed Property
[GET / SET] The desired motor speed.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorSpeed { get; set; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.MovementAxis Property

PrismaticJointInfoMovementAxis Property
[GET / SET] The axis on which the body may move.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MovementAxis { get; set; }

Property Value

Type: Vector2
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.ReferenceAngle Property

PrismaticJointInfoReferenceAngle Property
[GET / SET] The reference angle that is used to constrain the bodies angle.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ReferenceAngle { get; set; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PrismaticJointInfo.UpperLimit Property

PrismaticJointInfoUpperLimit Property
[GET / SET] The upper joint limit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float UpperLimit { get; set; }

Property Value

Type: Single
See Also

Reference

PrismaticJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo Class

PulleyJointInfo Class
Constrains two RigidBodies as though connected using a rope that is fixed at two world anchor points.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsPulleyJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class PulleyJointInfo : JointInfo

The PulleyJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | PulleyJointInfo | Initializes a new instance of the PulleyJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LengthA | [GET] The current "rope length" on the first bodies side of the pulley.
Public property | LengthB | [GET] The current "rope length" on the second bodies side of the pulley.
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLengthA | [GET / SET] The maximum "rope length" on the first bodies side of the pulley.
Public property | MaxLengthB | [GET / SET] The maximum "rope length" on the second bodies side of the pulley.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Ratio | [GET / SET] The ratio by which the second rope end is enlarged or shrinked on size changes of the first rope end.
Public property | TotalLength | [GET / SET] The total length of the rope.
Public property | WorldAnchorA | [GET / SET] The first bodies world anchor point.
Public property | WorldAnchorB | [GET / SET] The second bodies world anchor point.
Top
See Also

Reference

Duality.Components.Physics Namespace


PulleyJointInfo Constructor

PulleyJointInfo Constructor
Initializes a new instance of the PulleyJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PulleyJointInfo()
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo Fields

PulleyJointInfo Fields

The PulleyJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo Methods

PulleyJointInfo Methods

The PulleyJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.CreateJoint Method

PulleyJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo Properties

PulleyJointInfo Properties

The PulleyJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LengthA | [GET] The current "rope length" on the first bodies side of the pulley.
Public property | LengthB | [GET] The current "rope length" on the second bodies side of the pulley.
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLengthA | [GET / SET] The maximum "rope length" on the first bodies side of the pulley.
Public property | MaxLengthB | [GET / SET] The maximum "rope length" on the second bodies side of the pulley.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | Ratio | [GET / SET] The ratio by which the second rope end is enlarged or shrinked on size changes of the first rope end.
Public property | TotalLength | [GET / SET] The total length of the rope.
Public property | WorldAnchorA | [GET / SET] The first bodies world anchor point.
Public property | WorldAnchorB | [GET / SET] The second bodies world anchor point.
Top
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.LengthA Property

PulleyJointInfoLengthA Property
[GET] The current "rope length" on the first bodies side of the pulley.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LengthA { get; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.LengthB Property

PulleyJointInfoLengthB Property
[GET] The current "rope length" on the second bodies side of the pulley.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LengthB { get; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.LocalAnchorA Property

PulleyJointInfoLocalAnchorA Property
[GET / SET] The first bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.LocalAnchorB Property

PulleyJointInfoLocalAnchorB Property
[GET / SET] The second bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.MaxLengthA Property

PulleyJointInfoMaxLengthA Property
[GET / SET] The maximum "rope length" on the first bodies side of the pulley.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxLengthA { get; set; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.MaxLengthB Property

PulleyJointInfoMaxLengthB Property
[GET / SET] The maximum "rope length" on the second bodies side of the pulley.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxLengthB { get; set; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.Ratio Property

PulleyJointInfoRatio Property
[GET / SET] The ratio by which the second rope end is enlarged or shrinked on size changes of the first rope end.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Ratio { get; set; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.TotalLength Property

PulleyJointInfoTotalLength Property
[GET / SET] The total length of the rope.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TotalLength { get; set; }

Property Value

Type: Single
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.WorldAnchorA Property

PulleyJointInfoWorldAnchorA Property
[GET / SET] The first bodies world anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 WorldAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


PulleyJointInfo.WorldAnchorB Property

PulleyJointInfoWorldAnchorB Property
[GET / SET] The second bodies world anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 WorldAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

PulleyJointInfo Class
Duality.Components.Physics Namespace


RayCastCallback Delegate

RayCastCallback Delegate
Called for each shape found in the query. You control how the ray cast proceeds by returning a float.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate float RayCastCallback(
    RayCastData data
)

Parameters

data
Type: Duality.Components.PhysicsRayCastData

Return Value

Type: Single
-1 to ignore the curret shape, 0 to terminate the raycast, data.Fraction to clip the ray for current hit, or 1 to continue.
See Also

Reference

Duality.Components.Physics Namespace


RayCastData Structure

RayCastData Structure
Provides data about a RigidBody RayCast.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct RayCastData

The RayCastData type exposes the following members.

Constructors
 | Name | Description
Public method | RayCastData | Initializes a new instance of the RayCastData class
Top
Properties
 | Name | Description
Public property | Body | [GET] The RigidBody that was hit.
Public property | Fraction | [GET] The fraction (0.0f - 1.0f) of the ray at which the hit occurred.
Public property | GameObj | [GET] The GameObject that was hit.
Public property | Normal | [GET] The normal of the ray / shape collision.
Public property | Pos | [GET] The world position at which the shape was hit.
Public property | Shape | [GET] The shape that was hit.
Top
See Also

Reference

Duality.Components.Physics Namespace


RayCastData Constructor

RayCastData Constructor
Initializes a new instance of the RayCastData class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RayCastData(
    ShapeInfo shape,
    Vector2 pos,
    Vector2 normal,
    float fraction
)

Parameters

shape
Type: Duality.Components.PhysicsShapeInfo
pos
Type: DualityVector2
normal
Type: DualityVector2
fraction
Type: SystemSingle
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData Properties

RayCastData Properties

The RayCastData type exposes the following members.

Properties
 | Name | Description
Public property | Body | [GET] The RigidBody that was hit.
Public property | Fraction | [GET] The fraction (0.0f - 1.0f) of the ray at which the hit occurred.
Public property | GameObj | [GET] The GameObject that was hit.
Public property | Normal | [GET] The normal of the ray / shape collision.
Public property | Pos | [GET] The world position at which the shape was hit.
Public property | Shape | [GET] The shape that was hit.
Top
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.Body Property

RayCastDataBody Property
[GET] The RigidBody that was hit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody Body { get; }

Property Value

Type: RigidBody
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.Fraction Property

RayCastDataFraction Property
[GET] The fraction (0.0f - 1.0f) of the ray at which the hit occurred.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Fraction { get; }

Property Value

Type: Single
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.GameObj Property

RayCastDataGameObj Property
[GET] The GameObject that was hit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject GameObj { get; }

Property Value

Type: GameObject
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.Normal Property

RayCastDataNormal Property
[GET] The normal of the ray / shape collision.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Normal { get; }

Property Value

Type: Vector2
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.Pos Property

RayCastDataPos Property
[GET] The world position at which the shape was hit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Pos { get; }

Property Value

Type: Vector2
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RayCastData.Shape Property

RayCastDataShape Property
[GET] The shape that was hit.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo Shape { get; }

Property Value

Type: ShapeInfo
See Also

Reference

RayCastData Structure
Duality.Components.Physics Namespace


RevoluteJointInfo Class

RevoluteJointInfo Class
Pins two locally anchored RigidBodies together without constraining rotation.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsRevoluteJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class RevoluteJointInfo : JointInfo

The RevoluteJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | RevoluteJointInfo | Initializes a new instance of the RevoluteJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | JointAngle | [GET] The current joint angle in radians.
Public property | JointSpeed | [GET] The current joint angle speed in radians per frame.
Public property | LimitEnabled | [GET / SET] Is the joint limited in its angle?
Public property | LocalAnchorA | [GET / SET] The first RigidBodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second RigidBodies local anchor point.
Public property | LowerLimit | [GET / SET] The lower joint limit in radians.
Public property | MaxMotorTorque | [GET / SET] The maximum motor torque.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorSpeed | [GET / SET] The desired motor speed in degree per frame.
Public property | MotorTorque | [GET] The current joint motor torque.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | ReferenceAngle | [GET / SET] The joint's reference angle.
Public property | UpperLimit | [GET / SET] The upper joint limit in radians.
Top
See Also

Reference

Duality.Components.Physics Namespace


RevoluteJointInfo Constructor

RevoluteJointInfo Constructor
Initializes a new instance of the RevoluteJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RevoluteJointInfo()
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo Fields

RevoluteJointInfo Fields

The RevoluteJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo Methods

RevoluteJointInfo Methods

The RevoluteJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.CreateJoint Method

RevoluteJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo Properties

RevoluteJointInfo Properties

The RevoluteJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | JointAngle | [GET] The current joint angle in radians.
Public property | JointSpeed | [GET] The current joint angle speed in radians per frame.
Public property | LimitEnabled | [GET / SET] Is the joint limited in its angle?
Public property | LocalAnchorA | [GET / SET] The first RigidBodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second RigidBodies local anchor point.
Public property | LowerLimit | [GET / SET] The lower joint limit in radians.
Public property | MaxMotorTorque | [GET / SET] The maximum motor torque.
Public property | MotorEnabled | [GET / SET] Is the joint motor enabled?
Public property | MotorSpeed | [GET / SET] The desired motor speed in degree per frame.
Public property | MotorTorque | [GET] The current joint motor torque.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | ReferenceAngle | [GET / SET] The joint's reference angle.
Public property | UpperLimit | [GET / SET] The upper joint limit in radians.
Top
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.JointAngle Property

RevoluteJointInfoJointAngle Property
[GET] The current joint angle in radians.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointAngle { get; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.JointSpeed Property

RevoluteJointInfoJointSpeed Property
[GET] The current joint angle speed in radians per frame.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float JointSpeed { get; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.LimitEnabled Property

RevoluteJointInfoLimitEnabled Property
[GET / SET] Is the joint limited in its angle?

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool LimitEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.LocalAnchorA Property

RevoluteJointInfoLocalAnchorA Property
[GET / SET] The first RigidBodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.LocalAnchorB Property

RevoluteJointInfoLocalAnchorB Property
[GET / SET] The second RigidBodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.LowerLimit Property

RevoluteJointInfoLowerLimit Property
[GET / SET] The lower joint limit in radians.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LowerLimit { get; set; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.MaxMotorTorque Property

RevoluteJointInfoMaxMotorTorque Property
[GET / SET] The maximum motor torque.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxMotorTorque { get; set; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.MotorEnabled Property

RevoluteJointInfoMotorEnabled Property
[GET / SET] Is the joint motor enabled?

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool MotorEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.MotorSpeed Property

RevoluteJointInfoMotorSpeed Property
[GET / SET] The desired motor speed in degree per frame.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorSpeed { get; set; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.MotorTorque Property

RevoluteJointInfoMotorTorque Property
[GET] The current joint motor torque.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MotorTorque { get; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.ReferenceAngle Property

RevoluteJointInfoReferenceAngle Property
[GET / SET] The joint's reference angle.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ReferenceAngle { get; set; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RevoluteJointInfo.UpperLimit Property

RevoluteJointInfoUpperLimit Property
[GET / SET] The upper joint limit in radians.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float UpperLimit { get; set; }

Property Value

Type: Single
See Also

Reference

RevoluteJointInfo Class
Duality.Components.Physics Namespace


RigidBody Class

RigidBody Class
Represents a body instance for physical simulation, collision detection and response.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.Components.PhysicsRigidBody

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class RigidBody : Component,
    ICmpInitializable, ICmpUpdatable, ICmpEditorUpdatable

The RigidBody type exposes the following members.

Constructors
 | Name | Description
Public method | RigidBody | Initializes a new instance of the RigidBody class
Top
Methods
 | Name | Description
Public method | AddJoint | Adds a new joint to the body.
Public method | AddShape | Adds a new shape to the body.
Public method | ApplyLocalForce(Single) | Applies a Transform-local angular force to the object. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2) | Applies a Transform-local force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2, Vector2) | Applies a Transform-local force to the specified local point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalImpulse(Single) | Applies a Transform-local angular impulse to the object. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2) | Applies a Transform-local impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2, Vector2) | Applies a Transform-local impulse to the specified point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyWorldForce(Vector2) | Applies a world force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyWorldForce(Vector2, Vector2) | Applies a world force to the specified world point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyWorldImpulse(Vector2) | Applies a world impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyWorldImpulse(Vector2, Vector2) | Applies a world impulse to the specified world point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
 | AwakeAll | Awakes all currently existing RigidBodies.
Public method | AwakeBody | Awakes the body if it has been in a resting state that is now being left, such as when changing physical properties at runtime. You usually don't need to call this.
Public method | BeginUpdateBodyShape | Prepares this RigidBody for a large-scale shape update. This isn't required but might boost update performance.
Public method | ClearJoints | Removes all existing joints from the body.
Public method | ClearShapes | Removes all existing shapes from the body.
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | EndUpdateBodyShape | Restores this RigidBody after a large-scale shape update. See BeginUpdateBodyShape.
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | PickShape | Performs a physical picking operation and returns the shape in which the specified world coordinate is located in.
 | PickShapeGlobal | Performs a global physical picking operation and returns the shape in which the specified world coordinate is located in.
Public method | PickShapes(Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.
Public method | PickShapes(Vector2, Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.
 | PickShapesGlobal(Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.
 | PickShapesGlobal(Vector2, Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.
 | QueryRectGlobal | Performs a global physical AABB query and returns the bodies that might be roughly contained or intersected by the specified region.
 | RayCast(Vector2, Vector2, RayCastCallback) | Performs a 2d physical raycast in world coordinates.
 | RayCast(Vector2, Vector2, RayCastCallback, RayCastData) | Performs a 2d physical raycast in world coordinates.
 | RayCast(Vector2, Vector2, RayCastCallback, RawListRayCastData) | Performs a 2d physical raycast in world coordinates.
Public method | RemoveJoint | Removes an existing joint from the body.
Public method | RemoveShape | Removes an existing shape from the body.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | SynchronizeBodyShape | Forces previously scheduled body shape updates to execute. Changes to a RigidBodies shape are normally cached and executed in the following frame. Calling this method guarantes all scheduled updates to be performed immediately.
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AngularDamping | [GET / SET] The damping that is applied to the bodies angular velocity.
Public property | AngularVelocity | [GET / SET] The Colliders current angular velocity.
Public property | BodyType | [GET / SET] The type of the physical body.
Public property | BoundRadius | [GET] The physical bodys bounding radius.
Public property | CollidesWith | [GET / SET] A bitmask that specifies which collision categories this Collider interacts with.
Public property | CollisionCategory | [GET / SET] A bitmask that specifies the collision categories to which this Collider belongs.
Public property | CollisionFilter | [GET / SET] A callbcak method that is used to determine whether or not a collision should occur. While more costly than other means of collision filtering, this allows for a more fine-grained case-to-case decision.
Public property | ContinousCollision | [GET / SET] Whether the body is included in continous collision detection or not. It prevents the body from moving through others at high speeds at the cost of performance.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FixedAngle | [GET / SET] Whether the bodies rotation is fixed.
Public property | Friction | [GET / SET] The bodies overall friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IgnoreGravity | [GET / SET] Whether the body ignores gravity.
Public property | Inertia | [GET / SET] The bodies rotational inertia about the local origin. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated inertia. To reset to automated calculation, set to zero.
Public property | IsAwake | [GET] Whether the body is currently awake i.e. actively simulated.
Public property | Joints | [GET] Enumerates all joints that are connected to this Collider.
Public property | LinearDamping | [GET / SET] The damping that is applied to the bodies velocity.
Public property | LinearVelocity | [GET / SET] The Colliders current linear velocity.
Public property | LocalMassCenter | [GET] The bodies center of mass in local coordinates.
Public property | Mass | [GET / SET] The bodies overall mass. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated mass. To reset to automated calculation, set to zero.
Public property | Restitution | [GET / SET] The bodies overall restitution value. Should be a value between 0.0 and 1.0.
Public property | Revolutions | [GET] The bodies total number of revolutions.
Public property | Shapes | [GET] Enumerates all primitive shapes which this body consists of.
Public property | WorldMassCenter | [GET] The bodies center of mass in world coordinates.
Top
See Also

Reference

Duality.Components.Physics Namespace


RigidBody Constructor

RigidBody Constructor
Initializes a new instance of the RigidBody class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody Methods

RigidBody Methods

The RigidBody type exposes the following members.

Methods
 | Name | Description
Public method | AddJoint | Adds a new joint to the body.
Public method | AddShape | Adds a new shape to the body.
Public method | ApplyLocalForce(Single) | Applies a Transform-local angular force to the object. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2) | Applies a Transform-local force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2, Vector2) | Applies a Transform-local force to the specified local point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalImpulse(Single) | Applies a Transform-local angular impulse to the object. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2) | Applies a Transform-local impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2, Vector2) | Applies a Transform-local impulse to the specified point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyWorldForce(Vector2) | Applies a world force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyWorldForce(Vector2, Vector2) | Applies a world force to the specified world point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyWorldImpulse(Vector2) | Applies a world impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyWorldImpulse(Vector2, Vector2) | Applies a world impulse to the specified world point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
 | AwakeAll | Awakes all currently existing RigidBodies.
Public method | AwakeBody | Awakes the body if it has been in a resting state that is now being left, such as when changing physical properties at runtime. You usually don't need to call this.
Public method | BeginUpdateBodyShape | Prepares this RigidBody for a large-scale shape update. This isn't required but might boost update performance.
Public method | ClearJoints | Removes all existing joints from the body.
Public method | ClearShapes | Removes all existing shapes from the body.
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | EndUpdateBodyShape | Restores this RigidBody after a large-scale shape update. See BeginUpdateBodyShape.
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Protected method | OnCopyDataTo | (Overrides ComponentOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | PickShape | Performs a physical picking operation and returns the shape in which the specified world coordinate is located in.
 | PickShapeGlobal | Performs a global physical picking operation and returns the shape in which the specified world coordinate is located in.
Public method | PickShapes(Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.
Public method | PickShapes(Vector2, Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.
 | PickShapesGlobal(Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.
 | PickShapesGlobal(Vector2, Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.
 | QueryRectGlobal | Performs a global physical AABB query and returns the bodies that might be roughly contained or intersected by the specified region.
 | RayCast(Vector2, Vector2, RayCastCallback) | Performs a 2d physical raycast in world coordinates.
 | RayCast(Vector2, Vector2, RayCastCallback, RayCastData) | Performs a 2d physical raycast in world coordinates.
 | RayCast(Vector2, Vector2, RayCastCallback, RawListRayCastData) | Performs a 2d physical raycast in world coordinates.
Public method | RemoveJoint | Removes an existing joint from the body.
Public method | RemoveShape | Removes an existing shape from the body.
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | SynchronizeBodyShape | Forces previously scheduled body shape updates to execute. Changes to a RigidBodies shape are normally cached and executed in the following frame. Calling this method guarantes all scheduled updates to be performed immediately.
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.AddJoint Method

RigidBodyAddJoint Method
Adds a new joint to the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddJoint(
    JointInfo joint,
    RigidBody other = null
)

Parameters

joint
Type: Duality.Components.PhysicsJointInfo
other (Optional)
Type: Duality.Components.PhysicsRigidBody
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.AddShape Method

RigidBodyAddShape Method
Adds a new shape to the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddShape(
    ShapeInfo shape
)

Parameters

shape
Type: Duality.Components.PhysicsShapeInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ApplyLocalForce Method

RigidBodyApplyLocalForce Method
Overload List
 | Name | Description
Public method | ApplyLocalForce(Single) | Applies a Transform-local angular force to the object. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2) | Applies a Transform-local force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyLocalForce(Vector2, Vector2) | Applies a Transform-local force to the specified local point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ApplyLocalForce Method (Single)

RigidBodyApplyLocalForce Method (Single)
Applies a Transform-local angular force to the object. You don't need to apply TimeMult here, the physics simulation takes care of this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalForce(
    float angularForce
)

Parameters

angularForce
Type: SystemSingle
See Also

Reference

RigidBody Class
ApplyLocalForce Overload
Duality.Components.Physics Namespace


RigidBody.ApplyLocalForce Method (Vector2)

RigidBodyApplyLocalForce Method (Vector2)
Applies a Transform-local force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalForce(
    Vector2 force
)

Parameters

force
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyLocalForce Overload
Duality.Components.Physics Namespace


RigidBody.ApplyLocalForce Method (Vector2, Vector2)

RigidBodyApplyLocalForce Method (Vector2, Vector2)
Applies a Transform-local force to the specified local point. You don't need to apply TimeMult here, the physics simulation takes care of this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalForce(
    Vector2 force,
    Vector2 applyAt
)

Parameters

force
Type: DualityVector2
applyAt
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyLocalForce Overload
Duality.Components.Physics Namespace


RigidBody.ApplyLocalImpulse Method

RigidBodyApplyLocalImpulse Method
Overload List
 | Name | Description
Public method | ApplyLocalImpulse(Single) | Applies a Transform-local angular impulse to the object. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2) | Applies a Transform-local impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyLocalImpulse(Vector2, Vector2) | Applies a Transform-local impulse to the specified point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ApplyLocalImpulse Method (Single)

RigidBodyApplyLocalImpulse Method (Single)
Applies a Transform-local angular impulse to the object. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalImpulse(
    float angularImpulse
)

Parameters

angularImpulse
Type: SystemSingle
See Also

Reference

RigidBody Class
ApplyLocalImpulse Overload
Duality.Components.Physics Namespace


RigidBody.ApplyLocalImpulse Method (Vector2)

RigidBodyApplyLocalImpulse Method (Vector2)
Applies a Transform-local impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalImpulse(
    Vector2 impulse
)

Parameters

impulse
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyLocalImpulse Overload
Duality.Components.Physics Namespace


RigidBody.ApplyLocalImpulse Method (Vector2, Vector2)

RigidBodyApplyLocalImpulse Method (Vector2, Vector2)
Applies a Transform-local impulse to the specified point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyLocalImpulse(
    Vector2 impulse,
    Vector2 applyAt
)

Parameters

impulse
Type: DualityVector2
applyAt
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyLocalImpulse Overload
Duality.Components.Physics Namespace


RigidBody.ApplyWorldForce Method

RigidBodyApplyWorldForce Method
Overload List
 | Name | Description
Public method | ApplyWorldForce(Vector2) | Applies a world force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.
Public method | ApplyWorldForce(Vector2, Vector2) | Applies a world force to the specified world point. You don't need to apply TimeMult here, the physics simulation takes care of this.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ApplyWorldForce Method (Vector2)

RigidBodyApplyWorldForce Method (Vector2)
Applies a world force to the objects mass center. You don't need to apply TimeMult here, the physics simulation takes care of this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyWorldForce(
    Vector2 force
)

Parameters

force
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyWorldForce Overload
Duality.Components.Physics Namespace


RigidBody.ApplyWorldForce Method (Vector2, Vector2)

RigidBodyApplyWorldForce Method (Vector2, Vector2)
Applies a world force to the specified world point. You don't need to apply TimeMult here, the physics simulation takes care of this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyWorldForce(
    Vector2 force,
    Vector2 applyAt
)

Parameters

force
Type: DualityVector2
applyAt
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyWorldForce Overload
Duality.Components.Physics Namespace


RigidBody.ApplyWorldImpulse Method

RigidBodyApplyWorldImpulse Method
Overload List
 | Name | Description
Public method | ApplyWorldImpulse(Vector2) | Applies a world impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Public method | ApplyWorldImpulse(Vector2, Vector2) | Applies a world impulse to the specified world point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ApplyWorldImpulse Method (Vector2)

RigidBodyApplyWorldImpulse Method (Vector2)
Applies a world impulse to the objects mass center. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyWorldImpulse(
    Vector2 impulse
)

Parameters

impulse
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyWorldImpulse Overload
Duality.Components.Physics Namespace


RigidBody.ApplyWorldImpulse Method (Vector2, Vector2)

RigidBodyApplyWorldImpulse Method (Vector2, Vector2)
Applies a world impulse to the specified world point. You don't usually need to apply TimeMult here because it is inteded to be a one-time force impact.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyWorldImpulse(
    Vector2 impulse,
    Vector2 applyAt
)

Parameters

impulse
Type: DualityVector2
applyAt
Type: DualityVector2
See Also

Reference

RigidBody Class
ApplyWorldImpulse Overload
Duality.Components.Physics Namespace


RigidBody.AwakeAll Method

RigidBodyAwakeAll Method
Awakes all currently existing RigidBodies.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void AwakeAll()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.AwakeBody Method

RigidBodyAwakeBody Method
Awakes the body if it has been in a resting state that is now being left, such as when changing physical properties at runtime. You usually don't need to call this.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AwakeBody()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.BeginUpdateBodyShape Method

RigidBodyBeginUpdateBodyShape Method
Prepares this RigidBody for a large-scale shape update. This isn't required but might boost update performance.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void BeginUpdateBodyShape()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ClearJoints Method

RigidBodyClearJoints Method
Removes all existing joints from the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearJoints()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ClearShapes Method

RigidBodyClearShapes Method
Removes all existing shapes from the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearShapes()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.EndUpdateBodyShape Method

RigidBodyEndUpdateBodyShape Method
Restores this RigidBody after a large-scale shape update. See BeginUpdateBodyShape.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void EndUpdateBodyShape()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.OnCopyDataTo Method

RigidBodyOnCopyDataTo Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.OnSetupCloneTargets Method

RigidBodyOnSetupCloneTargets Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSetupCloneTargets(
    Object targetObj,
    ICloneTargetSetup setup
)

Parameters

targetObj
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.PickShape Method

RigidBodyPickShape Method
Performs a physical picking operation and returns the shape in which the specified world coordinate is located in.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo PickShape(
    Vector2 worldCoord
)

Parameters

worldCoord
Type: DualityVector2

Return Value

Type: ShapeInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.PickShapeGlobal Method

RigidBodyPickShapeGlobal Method
Performs a global physical picking operation and returns the shape in which the specified world coordinate is located in.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ShapeInfo PickShapeGlobal(
    Vector2 worldCoord
)

Parameters

worldCoord
Type: DualityVector2

Return Value

Type: ShapeInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.PickShapes Method

RigidBodyPickShapes Method
Overload List
 | Name | Description
Public method | PickShapes(Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.
Public method | PickShapes(Vector2, Vector2) | Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.PickShapes Method (Vector2)

RigidBodyPickShapes Method (Vector2)
Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<ShapeInfo> PickShapes(
    Vector2 worldCoord
)

Parameters

worldCoord
Type: DualityVector2

Return Value

Type: List ShapeInfo
See Also

Reference

RigidBody Class
PickShapes Overload
Duality.Components.Physics Namespace


RigidBody.PickShapes Method (Vector2, Vector2)

RigidBodyPickShapes Method (Vector2, Vector2)
Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<ShapeInfo> PickShapes(
    Vector2 worldCoord,
    Vector2 size
)

Parameters

worldCoord
Type: DualityVector2
size
Type: DualityVector2

Return Value

Type: List ShapeInfo
See Also

Reference

RigidBody Class
PickShapes Overload
Duality.Components.Physics Namespace


RigidBody.PickShapesGlobal Method

RigidBodyPickShapesGlobal Method
Overload List
Name | Description
PickShapesGlobal(Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.
PickShapesGlobal(Vector2, Vector2) | Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.PickShapesGlobal Method (Vector2)

RigidBodyPickShapesGlobal Method (Vector2)
Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<ShapeInfo> PickShapesGlobal(
    Vector2 worldCoord
)

Parameters

worldCoord
Type: DualityVector2

Return Value

Type: List ShapeInfo
See Also

Reference

RigidBody Class
PickShapesGlobal Overload
Duality.Components.Physics Namespace


RigidBody.PickShapesGlobal Method (Vector2, Vector2)

RigidBodyPickShapesGlobal Method (Vector2, Vector2)
Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<ShapeInfo> PickShapesGlobal(
    Vector2 worldCoord,
    Vector2 size
)

Parameters

worldCoord
Type: DualityVector2
size
Type: DualityVector2

Return Value

Type: List ShapeInfo
See Also

Reference

RigidBody Class
PickShapesGlobal Overload
Duality.Components.Physics Namespace


RigidBody.QueryRectGlobal Method

RigidBodyQueryRectGlobal Method
Performs a global physical AABB query and returns the bodies that might be roughly contained or intersected by the specified region.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static List<RigidBody> QueryRectGlobal(
    Vector2 worldCoord,
    Vector2 size
)

Parameters

worldCoord
Type: DualityVector2
size
Type: DualityVector2

Return Value

Type: List RigidBody
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.RayCast Method

RigidBodyRayCast Method
Overload List
Name | Description
RayCast(Vector2, Vector2, RayCastCallback) | Performs a 2d physical raycast in world coordinates.
RayCast(Vector2, Vector2, RayCastCallback, RayCastData) | Performs a 2d physical raycast in world coordinates.
RayCast(Vector2, Vector2, RayCastCallback, RawListRayCastData) | Performs a 2d physical raycast in world coordinates.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.RayCast Method (Vector2, Vector2, RayCastCallback)

RigidBodyRayCast Method (Vector2, Vector2, RayCastCallback)
Performs a 2d physical raycast in world coordinates.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RayCast(
    Vector2 start,
    Vector2 end,
    RayCastCallback callback
)

Parameters

start
Type: DualityVector2
The starting point in world coordinates.
end
Type: DualityVector2
The desired end point in world coordinates.
callback
Type: Duality.Components.PhysicsRayCastCallback
The callback that is invoked for each hit on the raycast. Note that the order in which each hit occurs isn't deterministic and may appear random. Return -1 to ignore the curret shape, 0 to terminate the raycast, data.Fraction to clip the ray for current hit, or 1 to continue.
See Also

Reference

RigidBody Class
RayCast Overload
Duality.Components.Physics Namespace


RigidBody.RayCast Method (Vector2, Vector2, RayCastCallback, RayCastData)

RigidBodyRayCast Method (Vector2, Vector2, RayCastCallback, RayCastData)
Performs a 2d physical raycast in world coordinates.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool RayCast(
    Vector2 start,
    Vector2 end,
    RayCastCallback callback,
    out RayCastData firstHit
)

Parameters

start
Type: DualityVector2
The starting point in world coordinates.
end
Type: DualityVector2
The desired end point in world coordinates.
callback
Type: Duality.Components.PhysicsRayCastCallback
The callback that is invoked for each hit on the raycast. Note that the order in which each hit occurs isn't deterministic and may appear random. Return -1 to ignore the curret shape, 0 to terminate the raycast, data.Fraction to clip the ray for current hit, or 1 to continue.
firstHit
Type: Duality.Components.PhysicsRayCastData
Returns the first hit that occurs, i.e. the one with the highest proximity to the starting point.

Return Value

Type: Boolean
Returns whether anything has been hit.
See Also

Reference

RigidBody Class
RayCast Overload
Duality.Components.Physics Namespace


RigidBody.RayCast Method (Vector2, Vector2, RayCastCallback, RawList(RayCastData))

RigidBodyRayCast Method (Vector2, Vector2, RayCastCallback, RawListRayCastData)
Performs a 2d physical raycast in world coordinates.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RayCast(
    Vector2 start,
    Vector2 end,
    RayCastCallback callback,
    out RawList<RayCastData> hits
)

Parameters

start
Type: DualityVector2
The starting point in world coordinates.
end
Type: DualityVector2
The desired end point in world coordinates.
callback
Type: Duality.Components.PhysicsRayCastCallback
The callback that is invoked for each hit on the raycast. Note that the order in which each hit occurs isn't deterministic and may appear random. Return -1 to ignore the curret shape, 0 to terminate the raycast, data.Fraction to clip the ray for current hit, or 1 to continue.
hits
Type: DualityRawList RayCastData
Returns a list of all occurred hits, ordered by their Fraction value.
See Also

Reference

RigidBody Class
RayCast Overload
Duality.Components.Physics Namespace


RigidBody.RemoveJoint Method

RigidBodyRemoveJoint Method
Removes an existing joint from the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveJoint(
    JointInfo joint
)

Parameters

joint
Type: Duality.Components.PhysicsJointInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.RemoveShape Method

RigidBodyRemoveShape Method
Removes an existing shape from the body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveShape(
    ShapeInfo shape
)

Parameters

shape
Type: Duality.Components.PhysicsShapeInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.SynchronizeBodyShape Method

RigidBodySynchronizeBodyShape Method
Forces previously scheduled body shape updates to execute. Changes to a RigidBodies shape are normally cached and executed in the following frame. Calling this method guarantes all scheduled updates to be performed immediately.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SynchronizeBodyShape()
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody Properties

RigidBody Properties

The RigidBody type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AngularDamping | [GET / SET] The damping that is applied to the bodies angular velocity.
Public property | AngularVelocity | [GET / SET] The Colliders current angular velocity.
Public property | BodyType | [GET / SET] The type of the physical body.
Public property | BoundRadius | [GET] The physical bodys bounding radius.
Public property | CollidesWith | [GET / SET] A bitmask that specifies which collision categories this Collider interacts with.
Public property | CollisionCategory | [GET / SET] A bitmask that specifies the collision categories to which this Collider belongs.
Public property | CollisionFilter | [GET / SET] A callbcak method that is used to determine whether or not a collision should occur. While more costly than other means of collision filtering, this allows for a more fine-grained case-to-case decision.
Public property | ContinousCollision | [GET / SET] Whether the body is included in continous collision detection or not. It prevents the body from moving through others at high speeds at the cost of performance.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FixedAngle | [GET / SET] Whether the bodies rotation is fixed.
Public property | Friction | [GET / SET] The bodies overall friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IgnoreGravity | [GET / SET] Whether the body ignores gravity.
Public property | Inertia | [GET / SET] The bodies rotational inertia about the local origin. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated inertia. To reset to automated calculation, set to zero.
Public property | IsAwake | [GET] Whether the body is currently awake i.e. actively simulated.
Public property | Joints | [GET] Enumerates all joints that are connected to this Collider.
Public property | LinearDamping | [GET / SET] The damping that is applied to the bodies velocity.
Public property | LinearVelocity | [GET / SET] The Colliders current linear velocity.
Public property | LocalMassCenter | [GET] The bodies center of mass in local coordinates.
Public property | Mass | [GET / SET] The bodies overall mass. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated mass. To reset to automated calculation, set to zero.
Public property | Restitution | [GET / SET] The bodies overall restitution value. Should be a value between 0.0 and 1.0.
Public property | Revolutions | [GET] The bodies total number of revolutions.
Public property | Shapes | [GET] Enumerates all primitive shapes which this body consists of.
Public property | WorldMassCenter | [GET] The bodies center of mass in world coordinates.
Top
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.AngularDamping Property

RigidBodyAngularDamping Property
[GET / SET] The damping that is applied to the bodies angular velocity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AngularDamping { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.AngularVelocity Property

RigidBodyAngularVelocity Property
[GET / SET] The Colliders current angular velocity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AngularVelocity { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.BodyType Property

RigidBodyBodyType Property
[GET / SET] The type of the physical body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BodyType BodyType { get; set; }

Property Value

Type: BodyType
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.BoundRadius Property

RigidBodyBoundRadius Property
[GET] The physical bodys bounding radius.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float BoundRadius { get; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.CollidesWith Property

RigidBodyCollidesWith Property
[GET / SET] A bitmask that specifies which collision categories this Collider interacts with.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionCategory CollidesWith { get; set; }

Property Value

Type: CollisionCategory
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.CollisionCategory Property

RigidBodyCollisionCategory Property
[GET / SET] A bitmask that specifies the collision categories to which this Collider belongs.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionCategory CollisionCategory { get; set; }

Property Value

Type: CollisionCategory
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.CollisionFilter Property

RigidBodyCollisionFilter Property
[GET / SET] A callbcak method that is used to determine whether or not a collision should occur. While more costly than other means of collision filtering, this allows for a more fine-grained case-to-case decision.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CollisionFilter CollisionFilter { get; set; }

Property Value

Type: CollisionFilter
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.ContinousCollision Property

RigidBodyContinousCollision Property
[GET / SET] Whether the body is included in continous collision detection or not. It prevents the body from moving through others at high speeds at the cost of performance.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ContinousCollision { get; set; }

Property Value

Type: Boolean
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.FixedAngle Property

RigidBodyFixedAngle Property
[GET / SET] Whether the bodies rotation is fixed.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool FixedAngle { get; set; }

Property Value

Type: Boolean
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Friction Property

RigidBodyFriction Property
[GET / SET] The bodies overall friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Friction { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.IgnoreGravity Property

RigidBodyIgnoreGravity Property
[GET / SET] Whether the body ignores gravity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IgnoreGravity { get; set; }

Property Value

Type: Boolean
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Inertia Property

RigidBodyInertia Property
[GET / SET] The bodies rotational inertia about the local origin. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated inertia. To reset to automated calculation, set to zero.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Inertia { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.IsAwake Property

RigidBodyIsAwake Property
[GET] Whether the body is currently awake i.e. actively simulated.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAwake { get; }

Property Value

Type: Boolean
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Joints Property

RigidBodyJoints Property
[GET] Enumerates all joints that are connected to this Collider.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<JointInfo> Joints { get; set; }

Property Value

Type: IEnumerable JointInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.LinearDamping Property

RigidBodyLinearDamping Property
[GET / SET] The damping that is applied to the bodies velocity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LinearDamping { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.LinearVelocity Property

RigidBodyLinearVelocity Property
[GET / SET] The Colliders current linear velocity.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LinearVelocity { get; set; }

Property Value

Type: Vector2
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.LocalMassCenter Property

RigidBodyLocalMassCenter Property
[GET] The bodies center of mass in local coordinates.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalMassCenter { get; }

Property Value

Type: Vector2
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Mass Property

RigidBodyMass Property
[GET / SET] The bodies overall mass. This is usually calculated automatically. You may however assign an explicit, fixed value to override the automatically calculated mass. To reset to automated calculation, set to zero.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Mass { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Restitution Property

RigidBodyRestitution Property
[GET / SET] The bodies overall restitution value. Should be a value between 0.0 and 1.0.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Restitution { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Revolutions Property

RigidBodyRevolutions Property
[GET] The bodies total number of revolutions.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Revolutions { get; }

Property Value

Type: Single
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.Shapes Property

RigidBodyShapes Property
[GET] Enumerates all primitive shapes which this body consists of.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<ShapeInfo> Shapes { get; set; }

Property Value

Type: IEnumerable ShapeInfo
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBody.WorldMassCenter Property

RigidBodyWorldMassCenter Property
[GET] The bodies center of mass in world coordinates.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 WorldMassCenter { get; }

Property Value

Type: Vector2
See Also

Reference

RigidBody Class
Duality.Components.Physics Namespace


RigidBodyCollisionEventArgs Class

RigidBodyCollisionEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
DualityCollisionEventArgs
Duality.Components.PhysicsRigidBodyCollisionEventArgs

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RigidBodyCollisionEventArgs : CollisionEventArgs

The RigidBodyCollisionEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | RigidBodyCollisionEventArgs | Initializes a new instance of the RigidBodyCollisionEventArgs class
Top
Properties
 | Name | Description
Public property | CollideWith | (Inherited from CollisionEventArgs.)
Public property | CollisionData | (Inherited from CollisionEventArgs.)
Public property | MyShape |
Public property | OtherShape |
Top
See Also

Reference

Duality.Components.Physics Namespace


RigidBodyCollisionEventArgs Constructor

RigidBodyCollisionEventArgs Constructor
Initializes a new instance of the RigidBodyCollisionEventArgs class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBodyCollisionEventArgs(
    GameObject obj,
    CollisionData data,
    ShapeInfo shapeA,
    ShapeInfo shapeB
)

Parameters

obj
Type: DualityGameObject
data
Type: DualityCollisionData
shapeA
Type: Duality.Components.PhysicsShapeInfo
shapeB
Type: Duality.Components.PhysicsShapeInfo
See Also

Reference

RigidBodyCollisionEventArgs Class
Duality.Components.Physics Namespace


RigidBodyCollisionEventArgs Properties

RigidBodyCollisionEventArgs Properties

The RigidBodyCollisionEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | CollideWith | (Inherited from CollisionEventArgs.)
Public property | CollisionData | (Inherited from CollisionEventArgs.)
Public property | MyShape |
Public property | OtherShape |
Top
See Also

Reference

RigidBodyCollisionEventArgs Class
Duality.Components.Physics Namespace


RigidBodyCollisionEventArgs.MyShape Property

RigidBodyCollisionEventArgsMyShape Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo MyShape { get; }

Property Value

Type: ShapeInfo
See Also

Reference

RigidBodyCollisionEventArgs Class
Duality.Components.Physics Namespace


RigidBodyCollisionEventArgs.OtherShape Property

RigidBodyCollisionEventArgsOtherShape Property

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShapeInfo OtherShape { get; }

Property Value

Type: ShapeInfo
See Also

Reference

RigidBodyCollisionEventArgs Class
Duality.Components.Physics Namespace


RopeJointInfo Class

RopeJointInfo Class
Constrains two RigidBodies to not exceed a maximum distance to each other.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsRopeJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class RopeJointInfo : JointInfo

The RopeJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | RopeJointInfo | Initializes a new instance of the RopeJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLength | [GET / SET] The maximum distance between both RigidBodies i.e. the "rope length".
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

Duality.Components.Physics Namespace


RopeJointInfo Constructor

RopeJointInfo Constructor
Initializes a new instance of the RopeJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RopeJointInfo()
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo Fields

RopeJointInfo Fields

The RopeJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo Methods

RopeJointInfo Methods

The RopeJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo.CreateJoint Method

RopeJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo Properties

RopeJointInfo Properties

The RopeJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLength | [GET / SET] The maximum distance between both RigidBodies i.e. the "rope length".
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo.LocalAnchorA Property

RopeJointInfoLocalAnchorA Property
[GET / SET] The first bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo.LocalAnchorB Property

RopeJointInfoLocalAnchorB Property
[GET / SET] The second bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


RopeJointInfo.MaxLength Property

RopeJointInfoMaxLength Property
[GET / SET] The maximum distance between both RigidBodies i.e. the "rope length".

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxLength { get; set; }

Property Value

Type: Single
See Also

Reference

RopeJointInfo Class
Duality.Components.Physics Namespace


ShapeInfo Class

ShapeInfo Class
Describes a Colliders primitive shape. A Colliders overall shape may be combined of any number of primitive shapes.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsShapeInfo
Duality.Components.PhysicsChainShapeInfo
Duality.Components.PhysicsCircleShapeInfo
Duality.Components.PhysicsLoopShapeInfo
Duality.Components.PhysicsPolyShapeInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class ShapeInfo

The ShapeInfo type exposes the following members.

Constructors
 | Name | Description
Protected method | ShapeInfo | Initializes a new instance of the ShapeInfo class
Protected method | ShapeInfo(Single) | Initializes a new instance of the ShapeInfo class
Top
Methods
 | Name | Description
Protected method | CreateFixture |
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties.
Top
Fields
 | Name | Description
Protected field | fixture |
Top
Properties
 | Name | Description
Public property | AABB | [GET] Returns the Shapes axis-aligned bounding box
Public property | Density | [GET / SET] The shapes density.
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body.
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation
Public property | Parent | [GET] The shape's parent RigidBody.
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0.
Top
See Also

Reference

Duality.Components.Physics Namespace


ShapeInfo Constructor

ShapeInfo Constructor
Overload List
 | Name | Description
Protected method | ShapeInfo | Initializes a new instance of the ShapeInfo class
Protected method | ShapeInfo(Single) | Initializes a new instance of the ShapeInfo class
Top
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo Constructor

ShapeInfo Constructor
Initializes a new instance of the ShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ShapeInfo()
See Also

Reference

ShapeInfo Class
ShapeInfo Overload
Duality.Components.Physics Namespace


ShapeInfo Constructor (Single)

ShapeInfo Constructor (Single)
Initializes a new instance of the ShapeInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ShapeInfo(
    float density
)

Parameters

density
Type: SystemSingle
See Also

Reference

ShapeInfo Class
ShapeInfo Overload
Duality.Components.Physics Namespace


ShapeInfo Fields

ShapeInfo Fields

The ShapeInfo type exposes the following members.

Fields
 | Name | Description
Protected field | fixture |
Top
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.fixture Field

ShapeInfofixture Field

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Fixture fixture

Field Value

Type: Fixture
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo Methods

ShapeInfo Methods

The ShapeInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateFixture |
Public method | UpdateShape | Updates the internal RigidBody Shape according to its properties.
Top
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.CreateFixture Method

ShapeInfoCreateFixture Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract Fixture CreateFixture(
    Body body
)

Parameters

body
Type: Body

Return Value

Type: Fixture
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.UpdateShape Method

ShapeInfoUpdateShape Method
Updates the internal RigidBody Shape according to its properties.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UpdateShape()
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo Properties

ShapeInfo Properties

The ShapeInfo type exposes the following members.

Properties
 | Name | Description
Public property | AABB | [GET] Returns the Shapes axis-aligned bounding box
Public property | Density | [GET / SET] The shapes density.
Public property | Friction | [GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.
Public property | IsSensor | [GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body.
Public property | IsValid | [GET] Whether or not the shape is a valid part of the physical simulation
Public property | Parent | [GET] The shape's parent RigidBody.
Public property | Restitution | [GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0.
Top
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.AABB Property

ShapeInfoAABB Property
[GET] Returns the Shapes axis-aligned bounding box

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract Rect AABB { get; }

Property Value

Type: Rect
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.Density Property

ShapeInfoDensity Property
[GET / SET] The shapes density.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Density { get; set; }

Property Value

Type: Single
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.Friction Property

ShapeInfoFriction Property
[GET / SET] The shapes friction value. Usually a value between 0.0 and 1.0, but higher values can be used to indicate unusually strong friction.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Friction { get; set; }

Property Value

Type: Single
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.IsSensor Property

ShapeInfoIsSensor Property
[GET / SET] Whether or not the shape acts as sensor i.e. is not part of a rigid body.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsSensor { get; set; }

Property Value

Type: Boolean
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.IsValid Property

ShapeInfoIsValid Property
[GET] Whether or not the shape is a valid part of the physical simulation

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsValid { get; }

Property Value

Type: Boolean
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.Parent Property

ShapeInfoParent Property
[GET] The shape's parent RigidBody.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBody Parent { get; }

Property Value

Type: RigidBody
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


ShapeInfo.Restitution Property

ShapeInfoRestitution Property
[GET / SET] The shapes restitution value. Should be a value between 0.0 and 1.0.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Restitution { get; set; }

Property Value

Type: Single
See Also

Reference

ShapeInfo Class
Duality.Components.Physics Namespace


SliderJointInfo Class

SliderJointInfo Class
Constrains two RigidBodies to keep their distance to each other in a certain range. You can view this as a massless, rigid rod.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsSliderJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SliderJointInfo : JointInfo

The SliderJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | SliderJointInfo | Initializes a new instance of the SliderJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLength | [GET / SET] The maximum distance between both RigidBodies.
Public property | MinLength | [GET / SET] The minimum distance between both RigidBodies.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

Duality.Components.Physics Namespace


SliderJointInfo Constructor

SliderJointInfo Constructor
Initializes a new instance of the SliderJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SliderJointInfo()
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo Fields

SliderJointInfo Fields

The SliderJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo Methods

SliderJointInfo Methods

The SliderJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo.CreateJoint Method

SliderJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo Properties

SliderJointInfo Properties

The SliderJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The first bodies local anchor point.
Public property | LocalAnchorB | [GET / SET] The second bodies local anchor point.
Public property | MaxLength | [GET / SET] The maximum distance between both RigidBodies.
Public property | MinLength | [GET / SET] The minimum distance between both RigidBodies.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Top
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo.LocalAnchorA Property

SliderJointInfoLocalAnchorA Property
[GET / SET] The first bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo.LocalAnchorB Property

SliderJointInfoLocalAnchorB Property
[GET / SET] The second bodies local anchor point.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo.MaxLength Property

SliderJointInfoMaxLength Property
[GET / SET] The maximum distance between both RigidBodies.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxLength { get; set; }

Property Value

Type: Single
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


SliderJointInfo.MinLength Property

SliderJointInfoMinLength Property
[GET / SET] The minimum distance between both RigidBodies.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinLength { get; set; }

Property Value

Type: Single
See Also

Reference

SliderJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo Class

WeldJointInfo Class
"Welds" two Colliders together so they share a common point and relative angle.
Inheritance Hierarchy
SystemObject
Duality.Components.PhysicsJointInfo
Duality.Components.PhysicsWeldJointInfo

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class WeldJointInfo : JointInfo

The WeldJointInfo type exposes the following members.

Constructors
 | Name | Description
Public method | WeldJointInfo | Initializes a new instance of the WeldJointInfo class
Top
Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The welding point, locally to the first object.
Public property | LocalAnchorB | [GET / SET] The welding point, locally to the second object.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | RefAngle | [GET / SET] The relative angle both objects need to keep.
Top
See Also

Reference

Duality.Components.Physics Namespace


WeldJointInfo Constructor

WeldJointInfo Constructor
Initializes a new instance of the WeldJointInfo class

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public WeldJointInfo()
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo Fields

WeldJointInfo Fields

The WeldJointInfo type exposes the following members.

Fields
 | Name | Description
Protected field | joint | (Inherited from JointInfo.)
Top
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo Methods

WeldJointInfo Methods

The WeldJointInfo type exposes the following members.

Methods
 | Name | Description
Protected method | CreateJoint | (Overrides JointInfoCreateJoint(Body, Body).)
Top
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo.CreateJoint Method

WeldJointInfoCreateJoint Method

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Joint CreateJoint(
    Body bodyA,
    Body bodyB
)

Parameters

bodyA
Type: Body
bodyB
Type: Body

Return Value

Type: Joint
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo Properties

WeldJointInfo Properties

The WeldJointInfo type exposes the following members.

Properties
 | Name | Description
Public property | BreakPoint | [GET / SET] Maximum joint error value before the joint break. Breaking does not remove the joint, but disable it. A value of zero or lower is interpreted as unbreakable. Note that some joints might not have breaking point support and will ignore this value. (Inherited from JointInfo.)
Public property | CollideConnected | [GET / SET] Specifies whether the connected Colliders will collide with each other. (Inherited from JointInfo.)
Public property | Disposed | (Inherited from JointInfo.)
Public property | Enabled | [GET / SET] Whether or not the joint is active. (Inherited from JointInfo.)
Public property | LocalAnchorA | [GET / SET] The welding point, locally to the first object.
Public property | LocalAnchorB | [GET / SET] The welding point, locally to the second object.
Public property | OtherBody | (Inherited from JointInfo.)
Public property | ParentBody | (Inherited from JointInfo.)
Public property | RefAngle | [GET / SET] The relative angle both objects need to keep.
Top
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo.LocalAnchorA Property

WeldJointInfoLocalAnchorA Property
[GET / SET] The welding point, locally to the first object.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorA { get; set; }

Property Value

Type: Vector2
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo.LocalAnchorB Property

WeldJointInfoLocalAnchorB Property
[GET / SET] The welding point, locally to the second object.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LocalAnchorB { get; set; }

Property Value

Type: Vector2
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


WeldJointInfo.RefAngle Property

WeldJointInfoRefAngle Property
[GET / SET] The relative angle both objects need to keep.

Namespace: Duality.Components.Physics
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RefAngle { get; set; }

Property Value

Type: Single
See Also

Reference

WeldJointInfo Class
Duality.Components.Physics Namespace


Duality.Components.Renderers Namespace

Duality.Components.Renderers Namespace
Classes
 | Class | Description
Public class | AnimSpriteRenderer | Renders an animated sprite to represent the GameObject.
Public class | RigidBodyRenderer | A Component that renders a RigidBodies shape and outline.
Public class | SpriteRenderer | Renders a sprite to represent the GameObject.
Public class | TextRenderer | Renders a text to represent the GameObject.
Enumerations
 | Enumeration | Description
Public enumeration | AnimSpriteRendererLoopMode | Describes the sprite animations loop behaviour.
Public enumeration | SpriteRendererFlipMode | Specifies whether the sprite should be flipped on a given axis.
Public enumeration | SpriteRendererUVMode | Specifies how the sprites uv-Coordinates are calculated.


AnimSpriteRenderer Class

AnimSpriteRenderer Class
Renders an animated sprite to represent the GameObject.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsRenderer
Duality.Components.RenderersSpriteRenderer
Duality.Components.RenderersAnimSpriteRenderer

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AnimSpriteRenderer : SpriteRenderer,
    ICmpUpdatable, ICmpInitializable

The AnimSpriteRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | AnimSpriteRenderer | Initializes a new instance of the AnimSpriteRenderer class
Public method | AnimSpriteRenderer(Rect, ContentRefMaterial) | Initializes a new instance of the AnimSpriteRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides SpriteRendererDraw(IDrawDevice).)
Protected method | GetAnimData |
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides SpriteRendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides SpriteRendererOnSetupCloneTargets(Object, ICloneTargetSetup).)
Protected method | PrepareVertices | (Inherited from SpriteRenderer.)
Protected method | PrepareVerticesSmooth |
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Protected method | RetrieveDrawTechnique | (Inherited from SpriteRenderer.)
Protected method | RetrieveMainColor | (Inherited from SpriteRenderer.)
Protected method | RetrieveMainTex | (Inherited from SpriteRenderer.)
Public method | ToString | (Inherited from Component.)
Public method | UpdateVisibleFrames | Updates the CurrentFrame, NextFrame and CurrentFrameProgress properties immediately. This is called implicitly once each frame before drawing, so you don't normally call this. However, when changing animation parameters and requiring updated animation frame data immediately, this could be helpful.
Top
Fields
 | Name | Description
Protected field | colorTint | (Inherited from SpriteRenderer.)
Protected field | customMat | (Inherited from SpriteRenderer.)
Protected field | flipMode | (Inherited from SpriteRenderer.)
Protected field | offset | (Inherited from SpriteRenderer.)
Protected field | pixelGrid | (Inherited from SpriteRenderer.)
Protected field | rect | (Inherited from SpriteRenderer.)
Protected field | rectMode | (Inherited from SpriteRenderer.)
Protected field | sharedMat | (Inherited from SpriteRenderer.)
Protected field | vertices | (Inherited from SpriteRenderer.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AlignToPixelGrid | [GET / SET] Specified whether or not the rendered sprite will be aligned to actual screen pixels. (Inherited from SpriteRenderer.)
Public property | AnimDuration | [GET / SET] The time a single animation cycle needs to complete, in seconds.
Public property | AnimFirstFrame | [GET / SET] The index of the first frame to display. Ignored if CustomFrameSequence is set.
Public property | AnimFrameCount | [GET / SET] The number of continous frames to use for the animation. Ignored if CustomFrameSequence is set.
Public property | AnimLoopMode | [GET / SET] The animations loop behaviour.
Public property | AnimPaused | [GET / SET] If true, the animation is paused and won't advance over time. AnimTime will stay constant until resumed.
Public property | AnimTime | [GET / SET] The animations current play time, i.e. the current state of the animation.
Public property | BoundRadius | (Inherited from SpriteRenderer.)
Public property | ColorTint | [GET / SET] A color by which the sprite is tinted. (Inherited from SpriteRenderer.)
Public property | CurrentFrame | [GET] The currently visible animation frames index.
Public property | CurrentFrameProgress | [GET] The current animation frames progress where zero means "just entered the current frame" and one means "about to leave the current frame". This value is also used for smooth animation blending.
Public property | CustomFrameSequence | [GET / SET] A custom sequence of frame indices that will be used instead of the default range specified by AnimFirstFrame and AnimFrameCount. Unused if set to null.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the SharedMaterial, allowing this sprite to look unique without having to create its own Material Resource. However, this feature should be used with caution: Performance is better using shared Materials. (Inherited from SpriteRenderer.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Flip | [GET / SET] Specifies whether the sprite should be flipped on a given axis when redered. (Inherited from SpriteRenderer.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IsAnimationRunning | [GET] Whether the animation is currently running, i.e. if there is anything animated right now.
Public property | NextFrame | [GET] The next visible animation frames index.
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object. (Inherited from SpriteRenderer.)
Public property | Rect | [GET / SET] The rectangular area the sprite occupies. Relative to the GameObject. (Inherited from SpriteRenderer.)
Public property | RectMode | [GET / SET] Specifies how the sprites uv-Coordinates are calculated. (Inherited from SpriteRenderer.)
Public property | SharedMaterial | [GET / SET] The Material that is used for rendering the sprite. (Inherited from SpriteRenderer.)
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value. (Inherited from SpriteRenderer.)
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

Duality.Components.Renderers Namespace


AnimSpriteRenderer Constructor

AnimSpriteRenderer Constructor
Overload List
 | Name | Description
Public method | AnimSpriteRenderer | Initializes a new instance of the AnimSpriteRenderer class
Public method | AnimSpriteRenderer(Rect, ContentRefMaterial) | Initializes a new instance of the AnimSpriteRenderer class
Top
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer Constructor

AnimSpriteRenderer Constructor
Initializes a new instance of the AnimSpriteRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AnimSpriteRenderer()
See Also

Reference

AnimSpriteRenderer Class
AnimSpriteRenderer Overload
Duality.Components.Renderers Namespace


AnimSpriteRenderer Constructor (Rect, ContentRef(Material))

AnimSpriteRenderer Constructor (Rect, ContentRefMaterial)
Initializes a new instance of the AnimSpriteRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AnimSpriteRenderer(
    Rect rect,
    ContentRef<Material> mainMat
)

Parameters

rect
Type: DualityRect
mainMat
Type: DualityContentRef Material
See Also

Reference

AnimSpriteRenderer Class
AnimSpriteRenderer Overload
Duality.Components.Renderers Namespace


AnimSpriteRenderer Fields

AnimSpriteRenderer Fields

The AnimSpriteRenderer type exposes the following members.

Fields
 | Name | Description
Protected field | colorTint | (Inherited from SpriteRenderer.)
Protected field | customMat | (Inherited from SpriteRenderer.)
Protected field | flipMode | (Inherited from SpriteRenderer.)
Protected field | offset | (Inherited from SpriteRenderer.)
Protected field | pixelGrid | (Inherited from SpriteRenderer.)
Protected field | rect | (Inherited from SpriteRenderer.)
Protected field | rectMode | (Inherited from SpriteRenderer.)
Protected field | sharedMat | (Inherited from SpriteRenderer.)
Protected field | vertices | (Inherited from SpriteRenderer.)
Top
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer Methods

AnimSpriteRenderer Methods

The AnimSpriteRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides SpriteRendererDraw(IDrawDevice).)
Protected method | GetAnimData |
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides SpriteRendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides SpriteRendererOnSetupCloneTargets(Object, ICloneTargetSetup).)
Protected method | PrepareVertices | (Inherited from SpriteRenderer.)
Protected method | PrepareVerticesSmooth |
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Protected method | RetrieveDrawTechnique | (Inherited from SpriteRenderer.)
Protected method | RetrieveMainColor | (Inherited from SpriteRenderer.)
Protected method | RetrieveMainTex | (Inherited from SpriteRenderer.)
Public method | ToString | (Inherited from Component.)
Public method | UpdateVisibleFrames | Updates the CurrentFrame, NextFrame and CurrentFrameProgress properties immediately. This is called implicitly once each frame before drawing, so you don't normally call this. However, when changing animation parameters and requiring updated animation frame data immediately, this could be helpful.
Top
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.Draw Method

AnimSpriteRendererDraw Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Implements

ICmpRendererDraw(IDrawDevice)
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.GetAnimData Method

AnimSpriteRendererGetAnimData Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void GetAnimData(
    Texture mainTex,
    DrawTechnique tech,
    bool smoothShaderInput,
    out Rect uvRect,
    out Rect uvRectNext
)

Parameters

mainTex
Type: Duality.ResourcesTexture
tech
Type: Duality.ResourcesDrawTechnique
smoothShaderInput
Type: SystemBoolean
uvRect
Type: DualityRect
uvRectNext
Type: DualityRect
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.OnCopyDataTo Method

AnimSpriteRendererOnCopyDataTo Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.OnSetupCloneTargets Method

AnimSpriteRendererOnSetupCloneTargets Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSetupCloneTargets(
    Object targetObj,
    ICloneTargetSetup setup
)

Parameters

targetObj
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.PrepareVerticesSmooth Method

AnimSpriteRendererPrepareVerticesSmooth Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void PrepareVerticesSmooth(
    ref VertexC1P3T4A1[] vertices,
    IDrawDevice device,
    float curAnimFrameFade,
    ColorRgba mainClr,
    Rect uvRect,
    Rect uvRectNext
)

Parameters

vertices
Type: Duality.DrawingVertexC1P3T4A1
device
Type: Duality.DrawingIDrawDevice
curAnimFrameFade
Type: SystemSingle
mainClr
Type: Duality.DrawingColorRgba
uvRect
Type: DualityRect
uvRectNext
Type: DualityRect
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.UpdateVisibleFrames Method

AnimSpriteRendererUpdateVisibleFrames Method
Updates the CurrentFrame, NextFrame and CurrentFrameProgress properties immediately. This is called implicitly once each frame before drawing, so you don't normally call this. However, when changing animation parameters and requiring updated animation frame data immediately, this could be helpful.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UpdateVisibleFrames()
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer Properties

AnimSpriteRenderer Properties

The AnimSpriteRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AlignToPixelGrid | [GET / SET] Specified whether or not the rendered sprite will be aligned to actual screen pixels. (Inherited from SpriteRenderer.)
Public property | AnimDuration | [GET / SET] The time a single animation cycle needs to complete, in seconds.
Public property | AnimFirstFrame | [GET / SET] The index of the first frame to display. Ignored if CustomFrameSequence is set.
Public property | AnimFrameCount | [GET / SET] The number of continous frames to use for the animation. Ignored if CustomFrameSequence is set.
Public property | AnimLoopMode | [GET / SET] The animations loop behaviour.
Public property | AnimPaused | [GET / SET] If true, the animation is paused and won't advance over time. AnimTime will stay constant until resumed.
Public property | AnimTime | [GET / SET] The animations current play time, i.e. the current state of the animation.
Public property | BoundRadius | (Inherited from SpriteRenderer.)
Public property | ColorTint | [GET / SET] A color by which the sprite is tinted. (Inherited from SpriteRenderer.)
Public property | CurrentFrame | [GET] The currently visible animation frames index.
Public property | CurrentFrameProgress | [GET] The current animation frames progress where zero means "just entered the current frame" and one means "about to leave the current frame". This value is also used for smooth animation blending.
Public property | CustomFrameSequence | [GET / SET] A custom sequence of frame indices that will be used instead of the default range specified by AnimFirstFrame and AnimFrameCount. Unused if set to null.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the SharedMaterial, allowing this sprite to look unique without having to create its own Material Resource. However, this feature should be used with caution: Performance is better using shared Materials. (Inherited from SpriteRenderer.)
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Flip | [GET / SET] Specifies whether the sprite should be flipped on a given axis when redered. (Inherited from SpriteRenderer.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IsAnimationRunning | [GET] Whether the animation is currently running, i.e. if there is anything animated right now.
Public property | NextFrame | [GET] The next visible animation frames index.
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object. (Inherited from SpriteRenderer.)
Public property | Rect | [GET / SET] The rectangular area the sprite occupies. Relative to the GameObject. (Inherited from SpriteRenderer.)
Public property | RectMode | [GET / SET] Specifies how the sprites uv-Coordinates are calculated. (Inherited from SpriteRenderer.)
Public property | SharedMaterial | [GET / SET] The Material that is used for rendering the sprite. (Inherited from SpriteRenderer.)
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value. (Inherited from SpriteRenderer.)
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimDuration Property

AnimSpriteRendererAnimDuration Property
[GET / SET] The time a single animation cycle needs to complete, in seconds.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AnimDuration { get; set; }

Property Value

Type: Single
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimFirstFrame Property

AnimSpriteRendererAnimFirstFrame Property
[GET / SET] The index of the first frame to display. Ignored if CustomFrameSequence is set.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimFirstFrame { get; set; }

Property Value

Type: Int32
Remarks
Animation indices are looked up in the Atlas map of the Texture that is used.
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimFrameCount Property

AnimSpriteRendererAnimFrameCount Property
[GET / SET] The number of continous frames to use for the animation. Ignored if CustomFrameSequence is set.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimFrameCount { get; set; }

Property Value

Type: Int32
Remarks
Animation indices are looked up in the Atlas map of the Texture that is used.
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimLoopMode Property

AnimSpriteRendererAnimLoopMode Property
[GET / SET] The animations loop behaviour.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AnimSpriteRendererLoopMode AnimLoopMode { get; set; }

Property Value

Type: AnimSpriteRendererLoopMode
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimPaused Property

AnimSpriteRendererAnimPaused Property
[GET / SET] If true, the animation is paused and won't advance over time. AnimTime will stay constant until resumed.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AnimPaused { get; set; }

Property Value

Type: Boolean
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.AnimTime Property

AnimSpriteRendererAnimTime Property
[GET / SET] The animations current play time, i.e. the current state of the animation.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AnimTime { get; set; }

Property Value

Type: Single
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.CurrentFrame Property

AnimSpriteRendererCurrentFrame Property
[GET] The currently visible animation frames index.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int CurrentFrame { get; }

Property Value

Type: Int32
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.CurrentFrameProgress Property

AnimSpriteRendererCurrentFrameProgress Property
[GET] The current animation frames progress where zero means "just entered the current frame" and one means "about to leave the current frame". This value is also used for smooth animation blending.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float CurrentFrameProgress { get; }

Property Value

Type: Single
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.CustomFrameSequence Property

AnimSpriteRendererCustomFrameSequence Property
[GET / SET] A custom sequence of frame indices that will be used instead of the default range specified by AnimFirstFrame and AnimFrameCount. Unused if set to null.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<int> CustomFrameSequence { get; set; }

Property Value

Type: List Int32
Remarks
Animation indices are looked up in the Atlas map of the Texture that is used.
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.IsAnimationRunning Property

AnimSpriteRendererIsAnimationRunning Property
[GET] Whether the animation is currently running, i.e. if there is anything animated right now.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAnimationRunning { get; }

Property Value

Type: Boolean
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.NextFrame Property

AnimSpriteRendererNextFrame Property
[GET] The next visible animation frames index.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int NextFrame { get; }

Property Value

Type: Int32
See Also

Reference

AnimSpriteRenderer Class
Duality.Components.Renderers Namespace


AnimSpriteRenderer.LoopMode Enumeration

AnimSpriteRendererLoopMode Enumeration
Describes the sprite animations loop behaviour.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum LoopMode
Members
Member name | Value | Description
Once | 0 | The animation is played once an then remains in its last frame.
Loop | 1 | The animation is looped: When reaching the last frame, it begins again at the first one.
PingPong | 2 | The animation plays forward until reaching the end, then reverses and plays backward until reaching the start again. This "pingpong" behaviour is looped.
RandomSingle | 3 | A single frame is selected randomly each time the object is initialized and remains static for its whole lifetime.
FixedSingle | 4 | A fixed, single frame is displayed. Which one depends on the one you set in the editor or in source code.
Queue | 5 | The CustomFrameSequence is interpreted and processed as a queue where AnimDuration is the time a single frame takes.
See Also

Reference

Duality.Components.Renderers Namespace


RigidBodyRenderer Class

RigidBodyRenderer Class
A Component that renders a RigidBodies shape and outline.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsRenderer
Duality.Components.RenderersRigidBodyRenderer

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RigidBodyRenderer : Renderer

The RigidBodyRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | RigidBodyRenderer | Initializes a new instance of the RigidBodyRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Inherited from Renderer.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AreaMaterial | [GET / SET] The Material that is used for rendering the RigidBodies shape areaa.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the rendered debug output is tinted.
Public property | CustomAreaMaterial | [GET / SET] A custom, local BatchInfo overriding the AreaMaterial.
Public property | CustomOutlineMaterial | [GET / SET] A custom, local BatchInfo overriding the OutlineMaterial.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FillHollowShapes | [GET / SET] Whether or not hollow shapes like the LoopShapeInfo will be filled as if they were in fact solid.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | OutlineMaterial | [GET / SET] The Material that is used for rendering the RigidBodies shape outlines.
Public property | OutlineWidth | [GET / SET] Specifies the width of the RigidBody outline when rendering. No outline will be rendered, if this value is smaller than or equal zero.
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Public property | WrapTexture | [GET / SET] Specifies, whether or not texture wrapping will be active when rendering the RigidBody area and outline.
Top
See Also

Reference

Duality.Components.Renderers Namespace


RigidBodyRenderer Constructor

RigidBodyRenderer Constructor
Initializes a new instance of the RigidBodyRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RigidBodyRenderer()
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer Methods

RigidBodyRenderer Methods

The RigidBodyRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Inherited from Renderer.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Component) operation for custom Component Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Component.)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.Draw Method

RigidBodyRendererDraw Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Implements

ICmpRendererDraw(IDrawDevice)
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer Properties

RigidBodyRenderer Properties

The RigidBodyRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AreaMaterial | [GET / SET] The Material that is used for rendering the RigidBodies shape areaa.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the rendered debug output is tinted.
Public property | CustomAreaMaterial | [GET / SET] A custom, local BatchInfo overriding the AreaMaterial.
Public property | CustomOutlineMaterial | [GET / SET] A custom, local BatchInfo overriding the OutlineMaterial.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | FillHollowShapes | [GET / SET] Whether or not hollow shapes like the LoopShapeInfo will be filled as if they were in fact solid.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | OutlineMaterial | [GET / SET] The Material that is used for rendering the RigidBodies shape outlines.
Public property | OutlineWidth | [GET / SET] Specifies the width of the RigidBody outline when rendering. No outline will be rendered, if this value is smaller than or equal zero.
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Public property | WrapTexture | [GET / SET] Specifies, whether or not texture wrapping will be active when rendering the RigidBody area and outline.
Top
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.AreaMaterial Property

RigidBodyRendererAreaMaterial Property
[GET / SET] The Material that is used for rendering the RigidBodies shape areaa.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Material> AreaMaterial { get; set; }

Property Value

Type: ContentRef Material
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.BoundRadius Property

RigidBodyRendererBoundRadius Property

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override float BoundRadius { get; }

Property Value

Type: Single

Implements

ICmpRendererBoundRadius
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.ColorTint Property

RigidBodyRendererColorTint Property
[GET / SET] A color by which the rendered debug output is tinted.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ColorTint { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.CustomAreaMaterial Property

RigidBodyRendererCustomAreaMaterial Property
[GET / SET] A custom, local BatchInfo overriding the AreaMaterial.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo CustomAreaMaterial { get; set; }

Property Value

Type: BatchInfo
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.CustomOutlineMaterial Property

RigidBodyRendererCustomOutlineMaterial Property
[GET / SET] A custom, local BatchInfo overriding the OutlineMaterial.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo CustomOutlineMaterial { get; set; }

Property Value

Type: BatchInfo
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.FillHollowShapes Property

RigidBodyRendererFillHollowShapes Property
[GET / SET] Whether or not hollow shapes like the LoopShapeInfo will be filled as if they were in fact solid.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool FillHollowShapes { get; set; }

Property Value

Type: Boolean
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.Offset Property

RigidBodyRendererOffset Property
[GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Offset { get; set; }

Property Value

Type: Int32
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.OutlineMaterial Property

RigidBodyRendererOutlineMaterial Property
[GET / SET] The Material that is used for rendering the RigidBodies shape outlines.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Material> OutlineMaterial { get; set; }

Property Value

Type: ContentRef Material
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.OutlineWidth Property

RigidBodyRendererOutlineWidth Property
[GET / SET] Specifies the width of the RigidBody outline when rendering. No outline will be rendered, if this value is smaller than or equal zero.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float OutlineWidth { get; set; }

Property Value

Type: Single
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.VertexZOffset Property

RigidBodyRendererVertexZOffset Property
[GET] The internal Z-Offset added to the renderers vertices based on its Offset value.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float VertexZOffset { get; }

Property Value

Type: Single
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


RigidBodyRenderer.WrapTexture Property

RigidBodyRendererWrapTexture Property
[GET / SET] Specifies, whether or not texture wrapping will be active when rendering the RigidBody area and outline.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool WrapTexture { get; set; }

Property Value

Type: Boolean
See Also

Reference

RigidBodyRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer Class

SpriteRenderer Class
Renders a sprite to represent the GameObject.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsRenderer
Duality.Components.RenderersSpriteRenderer
Duality.Components.RenderersAnimSpriteRenderer

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class SpriteRenderer : Renderer

The SpriteRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | SpriteRenderer | Initializes a new instance of the SpriteRenderer class
Public method | SpriteRenderer(Rect, ContentRefMaterial) | Initializes a new instance of the SpriteRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides RendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Protected method | PrepareVertices |
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Protected method | RetrieveDrawTechnique |
Protected method | RetrieveMainColor |
Protected method | RetrieveMainTex |
Public method | ToString | (Inherited from Component.)
Top
Fields
 | Name | Description
Protected field | colorTint |
Protected field | customMat |
Protected field | flipMode |
Protected field | offset |
Protected field | pixelGrid |
Protected field | rect |
Protected field | rectMode |
Protected field | sharedMat |
Protected field | vertices |
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AlignToPixelGrid | [GET / SET] Specified whether or not the rendered sprite will be aligned to actual screen pixels.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the sprite is tinted.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the SharedMaterial, allowing this sprite to look unique without having to create its own Material Resource. However, this feature should be used with caution: Performance is better using shared Materials.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Flip | [GET / SET] Specifies whether the sprite should be flipped on a given axis when redered.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | Rect | [GET / SET] The rectangular area the sprite occupies. Relative to the GameObject.
Public property | RectMode | [GET / SET] Specifies how the sprites uv-Coordinates are calculated.
Public property | SharedMaterial | [GET / SET] The Material that is used for rendering the sprite.
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

Duality.Components.Renderers Namespace


SpriteRenderer Constructor

SpriteRenderer Constructor
Overload List
 | Name | Description
Public method | SpriteRenderer | Initializes a new instance of the SpriteRenderer class
Public method | SpriteRenderer(Rect, ContentRefMaterial) | Initializes a new instance of the SpriteRenderer class
Top
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer Constructor

SpriteRenderer Constructor
Initializes a new instance of the SpriteRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SpriteRenderer()
See Also

Reference

SpriteRenderer Class
SpriteRenderer Overload
Duality.Components.Renderers Namespace


SpriteRenderer Constructor (Rect, ContentRef(Material))

SpriteRenderer Constructor (Rect, ContentRefMaterial)
Initializes a new instance of the SpriteRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SpriteRenderer(
    Rect rect,
    ContentRef<Material> mainMat
)

Parameters

rect
Type: DualityRect
mainMat
Type: DualityContentRef Material
See Also

Reference

SpriteRenderer Class
SpriteRenderer Overload
Duality.Components.Renderers Namespace


SpriteRenderer Fields

SpriteRenderer Fields

The SpriteRenderer type exposes the following members.

Fields
 | Name | Description
Protected field | colorTint |
Protected field | customMat |
Protected field | flipMode |
Protected field | offset |
Protected field | pixelGrid |
Protected field | rect |
Protected field | rectMode |
Protected field | sharedMat |
Protected field | vertices |
Top
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.colorTint Field

SpriteRenderercolorTint Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ColorRgba colorTint

Field Value

Type: ColorRgba
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.customMat Field

SpriteRenderercustomMat Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected BatchInfo customMat

Field Value

Type: BatchInfo
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.flipMode Field

SpriteRendererflipMode Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SpriteRendererFlipMode flipMode

Field Value

Type: SpriteRendererFlipMode
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.offset Field

SpriteRendereroffset Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected int offset

Field Value

Type: Int32
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.pixelGrid Field

SpriteRendererpixelGrid Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected bool pixelGrid

Field Value

Type: Boolean
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.rect Field

SpriteRendererrect Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Rect rect

Field Value

Type: Rect
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.rectMode Field

SpriteRendererrectMode Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SpriteRendererUVMode rectMode

Field Value

Type: SpriteRendererUVMode
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.sharedMat Field

SpriteRenderersharedMat Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ContentRef<Material> sharedMat

Field Value

Type: ContentRef Material
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.vertices Field

SpriteRenderervertices Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected VertexC1P3T2[] vertices

Field Value

Type: VertexC1P3T2
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer Methods

SpriteRenderer Methods

The SpriteRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides RendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Protected method | PrepareVertices |
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Protected method | RetrieveDrawTechnique |
Protected method | RetrieveMainColor |
Protected method | RetrieveMainTex |
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.Draw Method

SpriteRendererDraw Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Implements

ICmpRendererDraw(IDrawDevice)
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.OnCopyDataTo Method

SpriteRendererOnCopyDataTo Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.OnSetupCloneTargets Method

SpriteRendererOnSetupCloneTargets Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSetupCloneTargets(
    Object targetObj,
    ICloneTargetSetup setup
)

Parameters

targetObj
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.PrepareVertices Method

SpriteRendererPrepareVertices Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void PrepareVertices(
    ref VertexC1P3T2[] vertices,
    IDrawDevice device,
    ColorRgba mainClr,
    Rect uvRect
)

Parameters

vertices
Type: Duality.DrawingVertexC1P3T2
device
Type: Duality.DrawingIDrawDevice
mainClr
Type: Duality.DrawingColorRgba
uvRect
Type: DualityRect
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.RetrieveDrawTechnique Method

SpriteRendererRetrieveDrawTechnique Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected DrawTechnique RetrieveDrawTechnique()

Return Value

Type: DrawTechnique
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.RetrieveMainColor Method

SpriteRendererRetrieveMainColor Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ColorRgba RetrieveMainColor()

Return Value

Type: ColorRgba
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.RetrieveMainTex Method

SpriteRendererRetrieveMainTex Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Texture RetrieveMainTex()

Return Value

Type: Texture
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer Properties

SpriteRenderer Properties

The SpriteRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | AlignToPixelGrid | [GET / SET] Specified whether or not the rendered sprite will be aligned to actual screen pixels.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the sprite is tinted.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the SharedMaterial, allowing this sprite to look unique without having to create its own Material Resource. However, this feature should be used with caution: Performance is better using shared Materials.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | Flip | [GET / SET] Specifies whether the sprite should be flipped on a given axis when redered.
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | Rect | [GET / SET] The rectangular area the sprite occupies. Relative to the GameObject.
Public property | RectMode | [GET / SET] Specifies how the sprites uv-Coordinates are calculated.
Public property | SharedMaterial | [GET / SET] The Material that is used for rendering the sprite.
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.AlignToPixelGrid Property

SpriteRendererAlignToPixelGrid Property
[GET / SET] Specified whether or not the rendered sprite will be aligned to actual screen pixels.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AlignToPixelGrid { get; set; }

Property Value

Type: Boolean
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.BoundRadius Property

SpriteRendererBoundRadius Property

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override float BoundRadius { get; }

Property Value

Type: Single

Implements

ICmpRendererBoundRadius
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.ColorTint Property

SpriteRendererColorTint Property
[GET / SET] A color by which the sprite is tinted.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ColorTint { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.CustomMaterial Property

SpriteRendererCustomMaterial Property
[GET / SET] A custom, local BatchInfo overriding the SharedMaterial, allowing this sprite to look unique without having to create its own Material Resource. However, this feature should be used with caution: Performance is better using shared Materials.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo CustomMaterial { get; set; }

Property Value

Type: BatchInfo
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.Flip Property

SpriteRendererFlip Property
[GET / SET] Specifies whether the sprite should be flipped on a given axis when redered.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SpriteRendererFlipMode Flip { get; set; }

Property Value

Type: SpriteRendererFlipMode
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.Offset Property

SpriteRendererOffset Property
[GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Offset { get; set; }

Property Value

Type: Int32
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.Rect Property

SpriteRendererRect Property
[GET / SET] The rectangular area the sprite occupies. Relative to the GameObject.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect Rect { get; set; }

Property Value

Type: Rect
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.RectMode Property

SpriteRendererRectMode Property
[GET / SET] Specifies how the sprites uv-Coordinates are calculated.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SpriteRendererUVMode RectMode { get; set; }

Property Value

Type: SpriteRendererUVMode
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.SharedMaterial Property

SpriteRendererSharedMaterial Property
[GET / SET] The Material that is used for rendering the sprite.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Material> SharedMaterial { get; set; }

Property Value

Type: ContentRef Material
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.VertexZOffset Property

SpriteRendererVertexZOffset Property
[GET] The internal Z-Offset added to the renderers vertices based on its Offset value.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float VertexZOffset { get; }

Property Value

Type: Single
See Also

Reference

SpriteRenderer Class
Duality.Components.Renderers Namespace


SpriteRenderer.FlipMode Enumeration

SpriteRendererFlipMode Enumeration
Specifies whether the sprite should be flipped on a given axis.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum FlipMode
Members
Member name | Value | Description
None | 0 | The sprite will not be flipped at all.
Horizontal | 1 | The sprite will be flipped on its horizontal axis.
Vertical | 2 | The sprite will be flipped on its vertical axis.
See Also

Reference

Duality.Components.Renderers Namespace


SpriteRenderer.UVMode Enumeration

SpriteRendererUVMode Enumeration
Specifies how the sprites uv-Coordinates are calculated.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum UVMode
Members
Member name | Value | Description
Stretch | 0 | The uv-Coordinates are constant, stretching the supplied texture to fit the SpriteRenderers dimensions.
WrapHorizontal | 1 | The u-Coordinate is calculated based on the available horizontal space, allowing the supplied texture to be tiled across the SpriteRenderers width.
WrapVertical | 2 | The v-Coordinate is calculated based on the available vertical space, allowing the supplied texture to be tiled across the SpriteRenderers height.
WrapBoth | 3 | The uv-Coordinates are calculated based on the available space, allowing the supplied texture to be tiled across the SpriteRenderers size.
See Also

Reference

Duality.Components.Renderers Namespace


TextRenderer Class

TextRenderer Class
Renders a text to represent the GameObject.
Inheritance Hierarchy
SystemObject
DualityComponent
Duality.ComponentsRenderer
Duality.Components.RenderersTextRenderer

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TextRenderer : Renderer,
    ICmpInitializable

The TextRenderer type exposes the following members.

Constructors
 | Name | Description
Public method | TextRenderer | Initializes a new instance of the TextRenderer class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides RendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
Fields
 | Name | Description
Protected field | blockAlign |
Protected field | colorTint |
Protected field | customMat |
Protected field | iconMat |
Protected field | offset |
Protected field | text |
Protected field | vertFont |
Protected field | vertIcon |
Top
Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | BlockAlign | [GET / SET] The text blocks alignment relative to the GameObject.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the displayed text is tinted.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the texts own Materials. Note that it does not override each Fonts Texture, but their DrawTechniques and main colors.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IconMat | [GET / SET] The Material to use for displaying icons ithin the text.
Public property | Metrics | [GET] The current texts metrics.
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | Text | [GET / SET] The text to display..
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

Duality.Components.Renderers Namespace


TextRenderer Constructor

TextRenderer Constructor
Initializes a new instance of the TextRenderer class

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextRenderer()
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer Fields

TextRenderer Fields

The TextRenderer type exposes the following members.

Fields
 | Name | Description
Protected field | blockAlign |
Protected field | colorTint |
Protected field | customMat |
Protected field | iconMat |
Protected field | offset |
Protected field | text |
Protected field | vertFont |
Protected field | vertIcon |
Top
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.blockAlign Field

TextRendererblockAlign Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Alignment blockAlign

Field Value

Type: Alignment
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.colorTint Field

TextRenderercolorTint Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ColorRgba colorTint

Field Value

Type: ColorRgba
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.customMat Field

TextRenderercustomMat Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected BatchInfo customMat

Field Value

Type: BatchInfo
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.iconMat Field

TextRenderericonMat Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ContentRef<Material> iconMat

Field Value

Type: ContentRef Material
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.offset Field

TextRendereroffset Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected int offset

Field Value

Type: Int32
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.text Field

TextRenderertext Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected FormattedText text

Field Value

Type: FormattedText
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.vertFont Field

TextRenderervertFont Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected VertexC1P3T2[][] vertFont

Field Value

Type: VertexC1P3T2
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.vertIcon Field

TextRenderervertIcon Field

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected VertexC1P3T2[] vertIcon

Field Value

Type: VertexC1P3T2
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer Methods

TextRenderer Methods

The TextRenderer type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Component. (Inherited from Component.)
Public method | CopyTo | Deep-copies this Components data to the specified target Component. If source and target Component Type do not match, the operation will fail. (Inherited from Component.)
Public method | Dispose | Disposes this Component. You usually don't need this - use DisposeLater(IManageableObject) instead. (Inherited from Component.)
Public method | Draw | (Overrides RendererDraw(IDrawDevice).)
Public method | GetRequiredComponents | Returns all Component Types this Component requires. (Inherited from Component.)
Public method | IsComponentRequirementMet(Component) | Returns whether this objects Component requirement is met. (Inherited from Component.)
Public method | IsComponentRequirementMet(GameObject, IEnumerableComponent) | Returns whether this objects Component requirement is met assuming a different parent GameObject (Inherited from Component.)
Public method | IsVisible | Determines if the Renderer is visible to the specified IDrawDevice. This is usually the case if they share at least one mutual visibility group. (Inherited from Renderer.)
Protected method | OnCopyDataTo | (Overrides RendererOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnSetupCloneTargets | (Overrides ComponentOnSetupCloneTargets(Object, ICloneTargetSetup).)
Public method | RequiresComponent(Type) | Returns whether this Component requires a Component of the specified Type. (Inherited from Component.)
Public method | ToString | (Inherited from Component.)
Top
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.Draw Method

TextRendererDraw Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Draw(
    IDrawDevice device
)

Parameters

device
Type: Duality.DrawingIDrawDevice

Implements

ICmpRendererDraw(IDrawDevice)
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.OnCopyDataTo Method

TextRendererOnCopyDataTo Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object targetObj,
    ICloneOperation operation
)

Parameters

targetObj
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.OnSetupCloneTargets Method

TextRendererOnSetupCloneTargets Method

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSetupCloneTargets(
    Object targetObj,
    ICloneTargetSetup setup
)

Parameters

targetObj
Type: SystemObject
setup
Type: Duality.CloningICloneTargetSetup
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer Properties

TextRenderer Properties

The TextRenderer type exposes the following members.

Properties
 | Name | Description
Public property | Active | [GET / SET] Whether or not the Component is currently active. To return true, both the Component itsself and its parent GameObject need to be active. (Inherited from Component.)
Public property | ActiveSingle | [GET / SET] Whether or not the Component is currently active. Unlike Active, this property ignores parent activation states and depends only on this single Component. The scene graph and other Duality instances usually check Active, not ActiveSingle. (Inherited from Component.)
Public property | BlockAlign | [GET / SET] The text blocks alignment relative to the GameObject.
Public property | BoundRadius | (Overrides RendererBoundRadius.)
Public property | ColorTint | [GET / SET] A color by which the displayed text is tinted.
Public property | CustomMaterial | [GET / SET] A custom, local BatchInfo overriding the texts own Materials. Note that it does not override each Fonts Texture, but their DrawTechniques and main colors.
Public property | Disposed | [GET] Returns whether this Component has been disposed. Disposed Components are not to be used and should be treated specifically or as null references by your code. (Inherited from Component.)
Public property | GameObj | [GET / SET] The GameObject to which this Component belongs. (Inherited from Component.)
Public property | IconMat | [GET / SET] The Material to use for displaying icons ithin the text.
Public property | Metrics | [GET] The current texts metrics.
Public property | Offset | [GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.
Public property | Text | [GET / SET] The text to display..
Public property | VertexZOffset | [GET] The internal Z-Offset added to the renderers vertices based on its Offset value.
Public property | VisibilityGroup | [GET / SET] A bitmask that informs about the set of visibility groups to which this Renderer belongs. Usually, a Renderer is considered visible to a Camera if they share at least one mutual visibility group. (Inherited from Renderer.)
Top
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.BlockAlign Property

TextRendererBlockAlign Property
[GET / SET] The text blocks alignment relative to the GameObject.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Alignment BlockAlign { get; set; }

Property Value

Type: Alignment
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.BoundRadius Property

TextRendererBoundRadius Property

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override float BoundRadius { get; }

Property Value

Type: Single

Implements

ICmpRendererBoundRadius
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.ColorTint Property

TextRendererColorTint Property
[GET / SET] A color by which the displayed text is tinted.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ColorTint { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.CustomMaterial Property

TextRendererCustomMaterial Property
[GET / SET] A custom, local BatchInfo overriding the texts own Materials. Note that it does not override each Fonts Texture, but their DrawTechniques and main colors.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo CustomMaterial { get; set; }

Property Value

Type: BatchInfo
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.IconMat Property

TextRendererIconMat Property
[GET / SET] The Material to use for displaying icons ithin the text.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Material> IconMat { get; set; }

Property Value

Type: ContentRef Material
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.Metrics Property

TextRendererMetrics Property
[GET] The current texts metrics.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextMetrics Metrics { get; }

Property Value

Type: FormattedTextMetrics
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.Offset Property

TextRendererOffset Property
[GET / SET] A virtual Z offset that affects the order in which objects are drawn. If you want to assure an object is drawn after another one, just assign a higher Offset value to the background object.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Offset { get; set; }

Property Value

Type: Int32
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.Text Property

TextRendererText Property
[GET / SET] The text to display..

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedText Text { get; set; }

Property Value

Type: FormattedText
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


TextRenderer.VertexZOffset Property

TextRendererVertexZOffset Property
[GET] The internal Z-Offset added to the renderers vertices based on its Offset value.

Namespace: Duality.Components.Renderers
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float VertexZOffset { get; }

Property Value

Type: Single
See Also

Reference

TextRenderer Class
Duality.Components.Renderers Namespace


Duality.Drawing Namespace

Duality.Drawing Namespace
Classes
 | Class | Description
Public class | BatchInfo | BatchInfos describe how an object, represented by a set of vertices, looks like.
Public class | Canvas | Provides high level drawing operations on top of an existing IDrawDevice. However, this class is not designed for drawing large batches of primitives / vertices at once. For large amounts of primitives you should consider directly using the underlying IDrawDevice instead to achieve best Profile.
Public class | CanvasBuffer | This class handles buffering and reusing vertex arrays created by a Canvas and is a measure of performance and memory footprint improvement when using Canvas on a regular basis.
Public class | CanvasState | Describes the state of a Canvas.
Public class | DrawDevice |
Public class | ExtMethodsIColorData |
Public class | ExtMethodsVertexMode |
Public class | FormattedText | Provides functionality for analyzing, handling and displaying formatted text.
Public class | FormattedTextAlignChangeElement | Changes the current lines' alignment. May be Left, Right or Center.
Public class | FormattedTextColorChangeElement | Changes the currently used ColorRgba.
Public class | FormattedTextElement | Represents an element of a formatted text.
Public class | FormattedTextFontChangeElement | Changes the currently used Font.
Public class | FormattedTextIconElement | Contains an icon.
Public class | FormattedTextMetrics | Provides information about a formatted texts metrics.
Public class | FormattedTextNewLineElement | Forces a line break at this position.
Public class | FormattedTextTextElement | Contains a text string.
Public class | ImageCodec |
Public class | PixelData | Represents a block of pixel data.
Public class | VertexDeclaration |
Public class | VertexElementAttribute |
Structures
 | Structure | Description
Public structure | ColorHsva | Represents a 16-byte Hsva color value.
Public structure | ColorRgba | Represents a 4-byte Rgba color value.
Public structure | FormattedTextFlowArea | An rectangular area that will be avoided by the text flow.
Public structure | FormattedTextIcon | An icon that can be displayed inside the formatted text.
Public structure | ScreenResolution |
Public structure | VertexC1P3 | Vertex data providing each vertex a position (3x4 byte) and color (1x4 byte).
Public structure | VertexC1P3T2 | Vertex data providing each vertex a position (3x4 byte), color (1x4 byte) and texture coordinate (2x4 byte)
Public structure | VertexC1P3T4A1 | Vertex data providing each vertex a position (3x4 byte), color (1x4 byte), two texture coordinates (4x4 byte) and a custom float vertex attribute (1x4 byte).
Public structure | VertexElement |
Interfaces
 | Interface | Description
Public interface | IColorData | A general interface for different types of color data.
Public interface | IDrawBatch |
Public interface | IDrawDevice | Defines a general interface for drawing devices. Its main duty is to accept and collect parameterized vertex data.
Public interface | IImageCodec |
Public interface | IVertexData | A general interface for different types of vertex data.
Public interface | IVertexUploader |
Enumerations
 | Enumeration | Description
Public enumeration | BlendMode | Enumerates different behviours on how to blend color data onto existing background color.
Public enumeration | ClearFlag | A Bitmask describing which components of the current rendering buffer to clear.
Public enumeration | ColorDataElementType | Describes the type of a color values individual elements (R, G, B, ...)
Public enumeration | ColorDataLayout | Describes the layout and purpose of color data values.
Public enumeration | DashPattern | Describes a pattern for dashed lines.
Public enumeration | FitTextMode | Specifies how a text fitting algorithm works.
Public enumeration | FontStyle | Specifies the style of a text.
Public enumeration | FormattedTextWrapMode | Describes word wrap behaviour.
Public enumeration | ImageScaleFilter | Represents a filtering method for rescaling images.
Public enumeration | PerspectiveMode | Specifies the perspective effect that is applied when rendering the world.
Public enumeration | RenderMatrix | Specifies a rendering matrix setup.
Public enumeration | TextureMagFilter | Defines which filtering algorithm will be used when displaying the Texture larger than it is.
Public enumeration | TextureMinFilter | Defines which filtering algorithm will be used when displaying the Texture smaller than it is.
Public enumeration | TexturePixelFormat | Defines the format that is used to store the Textures pixel data.
Public enumeration | TextureSizeMode | Defines how a Texture should handle pixel data without power-of-two dimensions.
Public enumeration | TextureWrapMode | Defines how Texture coordinates outside the regular [0 - 1] range will be handled.
Public enumeration | VertexElementRole |
Public enumeration | VertexElementType |
Public enumeration | VertexMode | Specifies the way in which incoming vertex data is interpreted in order to generate geometry.
Public enumeration | VisibilityFlag |


BatchInfo Class

BatchInfo Class
BatchInfos describe how an object, represented by a set of vertices, looks like.
Inheritance Hierarchy
SystemObject
Duality.DrawingBatchInfo

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class BatchInfo : IEquatable<BatchInfo>

The BatchInfo type exposes the following members.

Constructors
 | Name | Description
Public method | BatchInfo | Creates a new, empty BatchInfo.
Public method | BatchInfo(BatchInfo) | Creates a new BatchInfo based on an existing BatchInfo. This is essentially a copy constructor.
Public method | BatchInfo(Material) | Creates a new BatchInfo based on an existing Material.
Public method | BatchInfo(ContentRefDrawTechnique, ColorRgba, ContentRefTexture) | Creates a new single-texture BatchInfo.
Public method | BatchInfo(ContentRefDrawTechnique, ColorRgba, IEnumerableKeyValuePairString, ContentRefTexture, IEnumerableKeyValuePairString, Single) | Creates a new complex BatchInfo.
Top
Methods
 | Name | Description
Public method | CopyTo | Copies this BatchInfo's data to a different one.
Public method | Detach | Assures that the current BatchInfo is not a temporarily shallow copy of an existing one.
Public method | Equals(Object) | (Overrides ObjectEquals(Object).)
Public method | Equals(BatchInfo) |
Public method | GetHashCode | (Overrides ObjectGetHashCode.)
Public method | GetTexture | Gets a texture by name. Returns a null reference if the name doesn't exist.
Public method | GetUniform | Gets a uniform by name. Returns a null reference if the name doesn't exist.
Public method | MakeAvailable | Triggers content retrieval in all references Resources.
Public method | SetTexture | Sets a texture.
Public method | SetUniform(String, Single) | Sets a uniform value
Public method | SetUniform(String, Int32, Single) | Sets a uniform value
Public method | ToString | (Overrides ObjectToString.)
Top
Operators
Name | Description
Equality | Compares two BatchInfos for equality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.
Inequality | Compares two BatchInfos for inequality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.
Top
Properties
 | Name | Description
Public property | MainColor | [GET / SET] The main color, typically used for coloring displayed vertices.
Public property | MainTexture | [GET / SET] The main texture.
Public property | Technique | [GET / SET] The DrawTechnique that is used.
Public property | Textures | [GET / SET] The set of Textures to use.
Public property | Uniforms | [GET / SET] The set of uniform values to use.
Top
See Also

Reference

Duality.Drawing Namespace
Duality.ResourcesMaterial


BatchInfo Constructor

BatchInfo Constructor
Overload List
 | Name | Description
Public method | BatchInfo | Creates a new, empty BatchInfo.
Public method | BatchInfo(BatchInfo) | Creates a new BatchInfo based on an existing BatchInfo. This is essentially a copy constructor.
Public method | BatchInfo(Material) | Creates a new BatchInfo based on an existing Material.
Public method | BatchInfo(ContentRefDrawTechnique, ColorRgba, ContentRefTexture) | Creates a new single-texture BatchInfo.
Public method | BatchInfo(ContentRefDrawTechnique, ColorRgba, IEnumerableKeyValuePairString, ContentRefTexture, IEnumerableKeyValuePairString, Single) | Creates a new complex BatchInfo.
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo Constructor

BatchInfo Constructor
Creates a new, empty BatchInfo.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo()
See Also

Reference

BatchInfo Class
BatchInfo Overload
Duality.Drawing Namespace


BatchInfo Constructor (BatchInfo)

BatchInfo Constructor (BatchInfo)
Creates a new BatchInfo based on an existing BatchInfo. This is essentially a copy constructor.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo(
    BatchInfo source
)

Parameters

source
Type: Duality.DrawingBatchInfo
See Also

Reference

BatchInfo Class
BatchInfo Overload
Duality.Drawing Namespace


BatchInfo Constructor (Material)

BatchInfo Constructor (Material)
Creates a new BatchInfo based on an existing Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo(
    Material source
)

Parameters

source
Type: Duality.ResourcesMaterial
See Also

Reference

BatchInfo Class
BatchInfo Overload
Duality.Drawing Namespace


BatchInfo Constructor (ContentRef(DrawTechnique), ColorRgba, ContentRef(Texture))

BatchInfo Constructor (ContentRefDrawTechnique, ColorRgba, ContentRefTexture)
Creates a new single-texture BatchInfo.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo(
    ContentRef<DrawTechnique> technique,
    ColorRgba mainColor,
    ContentRef<Texture> mainTex
)

Parameters

technique
Type: DualityContentRef DrawTechnique
The DrawTechnique to use.
mainColor
Type: Duality.DrawingColorRgba
The MainColor to use.
mainTex
Type: DualityContentRef Texture
The main Texture to use.
See Also

Reference

BatchInfo Class
BatchInfo Overload
Duality.Drawing Namespace


BatchInfo Constructor (ContentRef(DrawTechnique), ColorRgba, IEnumerable(KeyValuePair(String, ContentRef(Texture))), IEnumerable(KeyValuePair(String, Single[])))

BatchInfo Constructor (ContentRefDrawTechnique, ColorRgba, IEnumerableKeyValuePairString, ContentRefTexture, IEnumerableKeyValuePairString, Single)
Creates a new complex BatchInfo.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo(
    ContentRef<DrawTechnique> technique,
    ColorRgba mainColor,
    IEnumerable<KeyValuePair<string, ContentRef<Texture>>> textures = null,
    IEnumerable<KeyValuePair<string, float[]>> uniforms = null
)

Parameters

technique
Type: DualityContentRef DrawTechnique
The DrawTechnique to use.
mainColor
Type: Duality.DrawingColorRgba
The MainColor to use.
textures (Optional)
Type: System.Collections.GenericIEnumerable KeyValuePair String, ContentRef Texture
A set of Textures to use.
uniforms (Optional)
Type: System.Collections.GenericIEnumerable KeyValuePair String, Single
A set of uniform values to use.
See Also

Reference

BatchInfo Class
BatchInfo Overload
Duality.Drawing Namespace


BatchInfo Methods

BatchInfo Methods

The BatchInfo type exposes the following members.

Methods
 | Name | Description
Public method | CopyTo | Copies this BatchInfo's data to a different one.
Public method | Detach | Assures that the current BatchInfo is not a temporarily shallow copy of an existing one.
Public method | Equals(Object) | (Overrides ObjectEquals(Object).)
Public method | Equals(BatchInfo) |
Public method | GetHashCode | (Overrides ObjectGetHashCode.)
Public method | GetTexture | Gets a texture by name. Returns a null reference if the name doesn't exist.
Public method | GetUniform | Gets a uniform by name. Returns a null reference if the name doesn't exist.
Public method | MakeAvailable | Triggers content retrieval in all references Resources.
Public method | SetTexture | Sets a texture.
Public method | SetUniform(String, Single) | Sets a uniform value
Public method | SetUniform(String, Int32, Single) | Sets a uniform value
Public method | ToString | (Overrides ObjectToString.)
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.CopyTo Method

BatchInfoCopyTo Method
Copies this BatchInfo's data to a different one.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    BatchInfo info
)

Parameters

info
Type: Duality.DrawingBatchInfo
The target BatchInfo to copy data to.
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Detach Method

BatchInfoDetach Method
Assures that the current BatchInfo is not a temporarily shallow copy of an existing one.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Detach()
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Equals Method

BatchInfoEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ObjectEquals(Object).)
Public method | Equals(BatchInfo) |
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Equals Method (Object)

BatchInfoEquals Method (Object)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

BatchInfo Class
Equals Overload
Duality.Drawing Namespace


BatchInfo.Equals Method (BatchInfo)

BatchInfoEquals Method (BatchInfo)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Equals(
    BatchInfo other
)

Parameters

other
Type: Duality.DrawingBatchInfo

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

BatchInfo Class
Equals Overload
Duality.Drawing Namespace


BatchInfo.GetHashCode Method

BatchInfoGetHashCode Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.GetTexture Method

BatchInfoGetTexture Method
Gets a texture by name. Returns a null reference if the name doesn't exist.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Texture> GetTexture(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: ContentRef Texture
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.GetUniform Method

BatchInfoGetUniform Method
Gets a uniform by name. Returns a null reference if the name doesn't exist.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float[] GetUniform(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: Single
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.MakeAvailable Method

BatchInfoMakeAvailable Method
Triggers content retrieval in all references Resources.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void MakeAvailable()
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.SetTexture Method

BatchInfoSetTexture Method
Sets a texture.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetTexture(
    string name,
    ContentRef<Texture> tex
)

Parameters

name
Type: SystemString
tex
Type: DualityContentRef Texture
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.SetUniform Method

BatchInfoSetUniform Method
Overload List
 | Name | Description
Public method | SetUniform(String, Single) | Sets a uniform value
Public method | SetUniform(String, Int32, Single) | Sets a uniform value
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.SetUniform Method (String, Single[])

BatchInfoSetUniform Method (String, Single)
Sets a uniform value

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetUniform(
    string name,
    params float[] uniform
)

Parameters

name
Type: SystemString
uniform
Type: SystemSingle
See Also

Reference

BatchInfo Class
SetUniform Overload
Duality.Drawing Namespace


BatchInfo.SetUniform Method (String, Int32, Single)

BatchInfoSetUniform Method (String, Int32, Single)
Sets a uniform value

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetUniform(
    string name,
    int index,
    float uniformVal
)

Parameters

name
Type: SystemString
index
Type: SystemInt32
uniformVal
Type: SystemSingle
See Also

Reference

BatchInfo Class
SetUniform Overload
Duality.Drawing Namespace


BatchInfo.ToString Method

BatchInfoToString Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo Operators

BatchInfo Operators

The BatchInfo type exposes the following members.

Operators
Name | Description
Equality | Compares two BatchInfos for equality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.
Inequality | Compares two BatchInfos for inequality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Equality Operator

BatchInfoEquality Operator
Compares two BatchInfos for equality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator ==(
    BatchInfo first,
    BatchInfo second
)

Parameters

first
Type: Duality.DrawingBatchInfo
second
Type: Duality.DrawingBatchInfo

Return Value

Type: Boolean
True, if both BatchInfos can be considered equal, false if not.
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Inequality Operator

BatchInfoInequality Operator
Compares two BatchInfos for inequality. If a ReferenceEquals(Object, Object) test fails, their actual data is compared.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool operator !=(
    BatchInfo first,
    BatchInfo second
)

Parameters

first
Type: Duality.DrawingBatchInfo
second
Type: Duality.DrawingBatchInfo

Return Value

Type: Boolean
True, if both BatchInfos can be considered unequal, false if not.
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo Properties

BatchInfo Properties

The BatchInfo type exposes the following members.

Properties
 | Name | Description
Public property | MainColor | [GET / SET] The main color, typically used for coloring displayed vertices.
Public property | MainTexture | [GET / SET] The main texture.
Public property | Technique | [GET / SET] The DrawTechnique that is used.
Public property | Textures | [GET / SET] The set of Textures to use.
Public property | Uniforms | [GET / SET] The set of uniform values to use.
Top
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.MainColor Property

BatchInfoMainColor Property
[GET / SET] The main color, typically used for coloring displayed vertices.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba MainColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.MainTexture Property

BatchInfoMainTexture Property
[GET / SET] The main texture.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Texture> MainTexture { get; set; }

Property Value

Type: ContentRef Texture
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Technique Property

BatchInfoTechnique Property
[GET / SET] The DrawTechnique that is used.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<DrawTechnique> Technique { get; set; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Textures Property

BatchInfoTextures Property
[GET / SET] The set of Textures to use.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<KeyValuePair<string, ContentRef<Texture>>> Textures { get; set; }

Property Value

Type: IEnumerable KeyValuePair String, ContentRef Texture
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BatchInfo.Uniforms Property

BatchInfoUniforms Property
[GET / SET] The set of uniform values to use.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<KeyValuePair<string, float[]>> Uniforms { get; set; }

Property Value

Type: IEnumerable KeyValuePair String, Single
See Also

Reference

BatchInfo Class
Duality.Drawing Namespace


BlendMode Enumeration

BlendMode Enumeration
Enumerates different behviours on how to blend color data onto existing background color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum BlendMode
Members
Member name | Value | Description
Reset | -1 | When passing this to a method, this value can be used to indicate "Restore to default settings".
Solid | 0 | Incoming color overwrites background color completely. Doesn't need Z-Sorting.
Mask | 1 | Incoming color overwrites background color but leaves out areas with low alpha. Doesn't need Z-Sorting.
Add | 2 | Incoming color is multiplied by its alpha value and then added to background color. Needs Z-Sorting.
Alpha | 3 | Incoming color overwrites background color, weighted by its alpha value. Needs Z-Sorting.
AlphaPre | 4 | Premultiplied Alpha: Colors specify brightness, alpha specifies opacity. Needs Z-Sorting.
Multiply | 5 | Incoming color scales background color. Needs Z-Sorting.
Light | 6 | Incoming color is multiplied and then added to background color. Needs Z-Sorting.
Invert | 7 | Incoming color inverts background color. Needs Z-Sorting.
Count | 8 | The total number of available BlendModes.
See Also

Reference

Duality.Drawing Namespace
Duality.ResourcesDrawTechnique


Canvas Class

Canvas Class
Provides high level drawing operations on top of an existing IDrawDevice. However, this class is not designed for drawing large batches of primitives / vertices at once. For large amounts of primitives you should consider directly using the underlying IDrawDevice instead to achieve best Profile.
Inheritance Hierarchy
SystemObject
Duality.DrawingCanvas

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Canvas

The Canvas type exposes the following members.

Constructors
 | Name | Description
Public method | Canvas | Creates a new Canvas that uses the specified IDrawDevice. You may optionally specify a CanvasBuffer for improving rendering performance and memory footprint when rendering similar shapes throughout multiple frames.
Top
Methods
 | Name | Description
Public method | DrawCircle(Single, Single, Single) | Draws the section of a circle
Public method | DrawCircle(Single, Single, Single, Single) | Draws the section of a circle.
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle.
Public method | DrawDashLine(Single, Single, Single, Single, DashPattern, Single) | Draws a flat line.
Public method | DrawDashLine(Single, Single, Single, Single, Single, Single, DashPattern, Single) | Draws a three-dimensional line.
Public method | DrawLine(Single, Single, Single, Single) | Draws a flat line.
Public method | DrawLine(Single, Single, Single, Single, Single, Single) | Draws a three-dimensional line.
Public method | DrawOval(Single, Single, Single, Single) | Draws the section of an oval.
Public method | DrawOval(Single, Single, Single, Single, Single) | Draws the section of an oval.
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Public method | DrawPolygon | Draws a convex polygon. All vertices share the same Z value.
Public method | DrawRect(Single, Single, Single, Single) | Draws a rectangle.
Public method | DrawRect(Single, Single, Single, Single, Single) | Draws a rectangle.
Public method | DrawSphere | Draws a three-dimensional sphere.
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, VertexC1P3T2, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(FormattedText, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Public method | DrawText(FormattedText, VertexC1P3T2, VertexC1P3T2, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Public method | DrawThickLine(Single, Single, Single, Single, Single) | Draws a thick, flat line.
Public method | DrawThickLine(Single, Single, Single, Single, Single, Single, Single) | Draws a thick, three-dimensional line.
Public method | DrawVerticesT | Draws a predefined set of vertices using the Canvas transformation.
Public method | FillCircle(Single, Single, Single) | Fills a circle.
Public method | FillCircle(Single, Single, Single, Single) | Fills a circle.
Public method | FillCircleSegment(Single, Single, Single, Single, Single) | Fills the section of a circle
Public method | FillCircleSegment(Single, Single, Single, Single, Single, Single, Single) | Fills the section of a circle.
Public method | FillOval(Single, Single, Single, Single) | Fills an oval
Public method | FillOval(Single, Single, Single, Single, Single) | Fills an oval.
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Public method | FillPolygon | Fills a polygon. All vertices share the same Z value, and the polygon needs to be convex.
Public method | FillPolygonOutline | Fills a polygons outline. All vertices share the same Z value.
Public method | FillRect(Single, Single, Single, Single) | Fills a rectangle.
Public method | FillRect(Single, Single, Single, Single, Single) | Fills a rectangle.
Public method | FillThickLine(Single, Single, Single, Single, Single) | Fills a thick, flat line.
Public method | FillThickLine(Single, Single, Single, Single, Single, Single, Single) | Fills a three-dimensional line.
Public method | FillThickLineStrip | Fills a thick line strip. All vertices share the same Z value.
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Public method | PopState | Removes the topmost CanvasState from the internal State stack.
Public method | PushState | Adds a clone of the current state on top of the internal CanvasState stack.
Public method | RequestVertexArray | Creates or retrieves an unused vertex array with the specified minimum size. If the Canvas has been created using a valid CanvasBuffer, old vertex arrays will be re-used wherever possible.
Top
Properties
 | Name | Description
Public property | DrawDevice | [GET] The underlying IDrawDevice that is used for drawing.
Public property | Height | [GET] The available height to draw on this Canvas.
Public property | State | [GET / SET] The Canvas' current CanvasState.
Public property | Width | [GET] The available width to draw on this Canvas.
Top
See Also

Reference

Duality.Drawing Namespace


Canvas Constructor

Canvas Constructor
Creates a new Canvas that uses the specified IDrawDevice. You may optionally specify a CanvasBuffer for improving rendering performance and memory footprint when rendering similar shapes throughout multiple frames.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Canvas(
    IDrawDevice device,
    CanvasBuffer buffer = null
)

Parameters

device
Type: Duality.DrawingIDrawDevice
buffer (Optional)
Type: Duality.DrawingCanvasBuffer
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas Methods

Canvas Methods

The Canvas type exposes the following members.

Methods
 | Name | Description
Public method | DrawCircle(Single, Single, Single) | Draws the section of a circle
Public method | DrawCircle(Single, Single, Single, Single) | Draws the section of a circle.
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle.
Public method | DrawDashLine(Single, Single, Single, Single, DashPattern, Single) | Draws a flat line.
Public method | DrawDashLine(Single, Single, Single, Single, Single, Single, DashPattern, Single) | Draws a three-dimensional line.
Public method | DrawLine(Single, Single, Single, Single) | Draws a flat line.
Public method | DrawLine(Single, Single, Single, Single, Single, Single) | Draws a three-dimensional line.
Public method | DrawOval(Single, Single, Single, Single) | Draws the section of an oval.
Public method | DrawOval(Single, Single, Single, Single, Single) | Draws the section of an oval.
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Public method | DrawPolygon | Draws a convex polygon. All vertices share the same Z value.
Public method | DrawRect(Single, Single, Single, Single) | Draws a rectangle.
Public method | DrawRect(Single, Single, Single, Single, Single) | Draws a rectangle.
Public method | DrawSphere | Draws a three-dimensional sphere.
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, VertexC1P3T2, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(FormattedText, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Public method | DrawText(FormattedText, VertexC1P3T2, VertexC1P3T2, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Public method | DrawThickLine(Single, Single, Single, Single, Single) | Draws a thick, flat line.
Public method | DrawThickLine(Single, Single, Single, Single, Single, Single, Single) | Draws a thick, three-dimensional line.
Public method | DrawVerticesT | Draws a predefined set of vertices using the Canvas transformation.
Public method | FillCircle(Single, Single, Single) | Fills a circle.
Public method | FillCircle(Single, Single, Single, Single) | Fills a circle.
Public method | FillCircleSegment(Single, Single, Single, Single, Single) | Fills the section of a circle
Public method | FillCircleSegment(Single, Single, Single, Single, Single, Single, Single) | Fills the section of a circle.
Public method | FillOval(Single, Single, Single, Single) | Fills an oval
Public method | FillOval(Single, Single, Single, Single, Single) | Fills an oval.
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Public method | FillPolygon | Fills a polygon. All vertices share the same Z value, and the polygon needs to be convex.
Public method | FillPolygonOutline | Fills a polygons outline. All vertices share the same Z value.
Public method | FillRect(Single, Single, Single, Single) | Fills a rectangle.
Public method | FillRect(Single, Single, Single, Single, Single) | Fills a rectangle.
Public method | FillThickLine(Single, Single, Single, Single, Single) | Fills a thick, flat line.
Public method | FillThickLine(Single, Single, Single, Single, Single, Single, Single) | Fills a three-dimensional line.
Public method | FillThickLineStrip | Fills a thick line strip. All vertices share the same Z value.
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Public method | PopState | Removes the topmost CanvasState from the internal State stack.
Public method | PushState | Adds a clone of the current state on top of the internal CanvasState stack.
Public method | RequestVertexArray | Creates or retrieves an unused vertex array with the specified minimum size. If the Canvas has been created using a valid CanvasBuffer, old vertex arrays will be re-used wherever possible.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawCircle Method

CanvasDrawCircle Method
Overload List
 | Name | Description
Public method | DrawCircle(Single, Single, Single) | Draws the section of a circle
Public method | DrawCircle(Single, Single, Single, Single) | Draws the section of a circle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawCircle Method (Single, Single, Single)

CanvasDrawCircle Method (Single, Single, Single)
Draws the section of a circle

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawCircle(
    float x,
    float y,
    float radius
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
radius
Type: SystemSingle
See Also

Reference

Canvas Class
DrawCircle Overload
Duality.Drawing Namespace


Canvas.DrawCircle Method (Single, Single, Single, Single)

CanvasDrawCircle Method (Single, Single, Single, Single)
Draws the section of a circle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawCircle(
    float x,
    float y,
    float z,
    float radius
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
radius
Type: SystemSingle
See Also

Reference

Canvas Class
DrawCircle Overload
Duality.Drawing Namespace


Canvas.DrawCircleSegment Method

CanvasDrawCircleSegment Method
Overload List
 | Name | Description
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle
Public method | DrawCircleSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of a circle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawCircleSegment Method (Single, Single, Single, Single, Single, Boolean)

CanvasDrawCircleSegment Method (Single, Single, Single, Single, Single, Boolean)
Draws the section of a circle

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawCircleSegment(
    float x,
    float y,
    float radius,
    float minAngle,
    float maxAngle,
    bool outline = false
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
radius
Type: SystemSingle
The rendered circles radius.
minAngle
Type: SystemSingle
The circle segments minimum angle.
maxAngle
Type: SystemSingle
The circle segments maximum angle.
outline (Optional)
Type: SystemBoolean
If true, the circle sections complete outline is drawn instead of just the outer perimeter.
See Also

Reference

Canvas Class
DrawCircleSegment Overload
Duality.Drawing Namespace


Canvas.DrawCircleSegment Method (Single, Single, Single, Single, Single, Single, Boolean)

CanvasDrawCircleSegment Method (Single, Single, Single, Single, Single, Single, Boolean)
Draws the section of a circle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawCircleSegment(
    float x,
    float y,
    float z,
    float radius,
    float minAngle,
    float maxAngle,
    bool outline = false
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
radius
Type: SystemSingle
The rendered circles radius.
minAngle
Type: SystemSingle
The circle segments minimum angle.
maxAngle
Type: SystemSingle
The circle segments maximum angle.
outline (Optional)
Type: SystemBoolean
If true, the circle sections complete outline is drawn instead of just the outer perimeter.
See Also

Reference

Canvas Class
DrawCircleSegment Overload
Duality.Drawing Namespace


Canvas.DrawDashLine Method

CanvasDrawDashLine Method
Overload List
 | Name | Description
Public method | DrawDashLine(Single, Single, Single, Single, DashPattern, Single) | Draws a flat line.
Public method | DrawDashLine(Single, Single, Single, Single, Single, Single, DashPattern, Single) | Draws a three-dimensional line.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawDashLine Method (Single, Single, Single, Single, DashPattern, Single)

CanvasDrawDashLine Method (Single, Single, Single, Single, DashPattern, Single)
Draws a flat line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawDashLine(
    float x,
    float y,
    float x2,
    float y2,
    DashPattern pattern = DashPattern.Dash,
    float patternLen = 1f
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
pattern (Optional)
Type: Duality.DrawingDashPattern
patternLen (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
DrawDashLine Overload
Duality.Drawing Namespace


Canvas.DrawDashLine Method (Single, Single, Single, Single, Single, Single, DashPattern, Single)

CanvasDrawDashLine Method (Single, Single, Single, Single, Single, Single, DashPattern, Single)
Draws a three-dimensional line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawDashLine(
    float x,
    float y,
    float z,
    float x2,
    float y2,
    float z2,
    DashPattern pattern = DashPattern.Dash,
    float patternLen = 1f
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
z2
Type: SystemSingle
pattern (Optional)
Type: Duality.DrawingDashPattern
patternLen (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
DrawDashLine Overload
Duality.Drawing Namespace


Canvas.DrawLine Method

CanvasDrawLine Method
Overload List
 | Name | Description
Public method | DrawLine(Single, Single, Single, Single) | Draws a flat line.
Public method | DrawLine(Single, Single, Single, Single, Single, Single) | Draws a three-dimensional line.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawLine Method (Single, Single, Single, Single)

CanvasDrawLine Method (Single, Single, Single, Single)
Draws a flat line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawLine(
    float x,
    float y,
    float x2,
    float y2
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
See Also

Reference

Canvas Class
DrawLine Overload
Duality.Drawing Namespace


Canvas.DrawLine Method (Single, Single, Single, Single, Single, Single)

CanvasDrawLine Method (Single, Single, Single, Single, Single, Single)
Draws a three-dimensional line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawLine(
    float x,
    float y,
    float z,
    float x2,
    float y2,
    float z2
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
z2
Type: SystemSingle
See Also

Reference

Canvas Class
DrawLine Overload
Duality.Drawing Namespace


Canvas.DrawOval Method

CanvasDrawOval Method
Overload List
 | Name | Description
Public method | DrawOval(Single, Single, Single, Single) | Draws the section of an oval.
Public method | DrawOval(Single, Single, Single, Single, Single) | Draws the section of an oval.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawOval Method (Single, Single, Single, Single)

CanvasDrawOval Method (Single, Single, Single, Single)
Draws the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOval(
    float x,
    float y,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
DrawOval Overload
Duality.Drawing Namespace


Canvas.DrawOval Method (Single, Single, Single, Single, Single)

CanvasDrawOval Method (Single, Single, Single, Single, Single)
Draws the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOval(
    float x,
    float y,
    float z,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
DrawOval Overload
Duality.Drawing Namespace


Canvas.DrawOvalSegment Method

CanvasDrawOvalSegment Method
Overload List
 | Name | Description
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Public method | DrawOvalSegment(Single, Single, Single, Single, Single, Single, Single, Boolean) | Draws the section of an oval.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawOvalSegment Method (Single, Single, Single, Single, Single, Single, Boolean)

CanvasDrawOvalSegment Method (Single, Single, Single, Single, Single, Single, Boolean)
Draws the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOvalSegment(
    float x,
    float y,
    float width,
    float height,
    float minAngle,
    float maxAngle,
    bool outline = false
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
The rendered ovals total width.
height
Type: SystemSingle
The rendered ovals total height.
minAngle
Type: SystemSingle
The oval segments minimum angle.
maxAngle
Type: SystemSingle
The oval segments maximum angle.
outline (Optional)
Type: SystemBoolean
If true, the oval sections complete outline is drawn instead of just the outer perimeter.
See Also

Reference

Canvas Class
DrawOvalSegment Overload
Duality.Drawing Namespace


Canvas.DrawOvalSegment Method (Single, Single, Single, Single, Single, Single, Single, Boolean)

CanvasDrawOvalSegment Method (Single, Single, Single, Single, Single, Single, Single, Boolean)
Draws the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOvalSegment(
    float x,
    float y,
    float z,
    float width,
    float height,
    float minAngle,
    float maxAngle,
    bool outline = false
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
width
Type: SystemSingle
The rendered ovals total width.
height
Type: SystemSingle
The rendered ovals total height.
minAngle
Type: SystemSingle
The oval segments minimum angle.
maxAngle
Type: SystemSingle
The oval segments maximum angle.
outline (Optional)
Type: SystemBoolean
If true, the oval sections complete outline is drawn instead of just the outer perimeter.
See Also

Reference

Canvas Class
DrawOvalSegment Overload
Duality.Drawing Namespace


Canvas.DrawPolygon Method

CanvasDrawPolygon Method
Draws a convex polygon. All vertices share the same Z value.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawPolygon(
    Vector2[] points,
    float x,
    float y,
    float z = 0f
)

Parameters

points
Type: DualityVector2
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawRect Method

CanvasDrawRect Method
Overload List
 | Name | Description
Public method | DrawRect(Single, Single, Single, Single) | Draws a rectangle.
Public method | DrawRect(Single, Single, Single, Single, Single) | Draws a rectangle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawRect Method (Single, Single, Single, Single)

CanvasDrawRect Method (Single, Single, Single, Single)
Draws a rectangle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawRect(
    float x,
    float y,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
w
Type: SystemSingle
h
Type: SystemSingle
See Also

Reference

Canvas Class
DrawRect Overload
Duality.Drawing Namespace


Canvas.DrawRect Method (Single, Single, Single, Single, Single)

CanvasDrawRect Method (Single, Single, Single, Single, Single)
Draws a rectangle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawRect(
    float x,
    float y,
    float z,
    float w,
    float h
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
w
Type: SystemSingle
h
Type: SystemSingle
See Also

Reference

Canvas Class
DrawRect Overload
Duality.Drawing Namespace


Canvas.DrawSphere Method

CanvasDrawSphere Method
Draws a three-dimensional sphere.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawSphere(
    float x,
    float y,
    float z,
    float r
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
r
Type: SystemSingle
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawText Method

CanvasDrawText Method
Overload List
 | Name | Description
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(String, VertexC1P3T2, Single, Single, Single, Alignment, Boolean) | Draws the specified text.
Public method | DrawText(FormattedText, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Public method | DrawText(FormattedText, VertexC1P3T2, VertexC1P3T2, Single, Single, Single, BatchInfo, Alignment, Boolean) | Draws the specified formatted text.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawText Method (String, Single, Single, Single, Alignment, Boolean)

CanvasDrawText Method (String, Single, Single, Single, Alignment, Boolean)
Draws the specified text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawText(
    string text,
    float x,
    float y,
    float z = 0f,
    Alignment blockAlign = Alignment.TopLeft,
    bool drawBackground = false
)

Parameters

text
Type: SystemString
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
blockAlign (Optional)
Type: DualityAlignment
Specifies the alignment of the text block.
drawBackground (Optional)
Type: SystemBoolean
See Also

Reference

Canvas Class
DrawText Overload
Duality.Drawing Namespace


Canvas.DrawText Method (String[], Single, Single, Single, Alignment, Boolean)

CanvasDrawText Method (String, Single, Single, Single, Alignment, Boolean)
Draws the specified text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawText(
    string[] text,
    float x,
    float y,
    float z = 0f,
    Alignment blockAlign = Alignment.TopLeft,
    bool drawBackground = false
)

Parameters

text
Type: SystemString
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
blockAlign (Optional)
Type: DualityAlignment
Specifies the alignment of the text block. To make use of individual line alignment, use the FormattedText overload.
drawBackground (Optional)
Type: SystemBoolean
See Also

Reference

Canvas Class
DrawText Overload
Duality.Drawing Namespace


Canvas.DrawText Method (String[], VertexC1P3T2[][], Single, Single, Single, Alignment, Boolean)

CanvasDrawText Method (String, VertexC1P3T2, Single, Single, Single, Alignment, Boolean)
Draws the specified text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawText(
    string[] text,
    ref VertexC1P3T2[][] vertices,
    float x,
    float y,
    float z = 0f,
    Alignment blockAlign = Alignment.TopLeft,
    bool drawBackground = false
)

Parameters

text
Type: SystemString
vertices
Type: Duality.DrawingVertexC1P3T2
Optional vertex cache to use for the text. If set, the texts vertices are cached and re-used for better Profile.
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
blockAlign (Optional)
Type: DualityAlignment
Specifies the alignment of the text block. To make use of individual line alignment, use the FormattedText overload.
drawBackground (Optional)
Type: SystemBoolean
See Also

Reference

Canvas Class
DrawText Overload
Duality.Drawing Namespace


Canvas.DrawText Method (FormattedText, Single, Single, Single, BatchInfo, Alignment, Boolean)

CanvasDrawText Method (FormattedText, Single, Single, Single, BatchInfo, Alignment, Boolean)
Draws the specified formatted text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawText(
    FormattedText text,
    float x,
    float y,
    float z = 0f,
    BatchInfo iconMat = null,
    Alignment blockAlign = Alignment.TopLeft,
    bool drawBackground = false
)

Parameters

text
Type: Duality.DrawingFormattedText
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
iconMat (Optional)
Type: Duality.DrawingBatchInfo
blockAlign (Optional)
Type: DualityAlignment
Specifies the alignment of the text block. To make use of individual line alignment, make use of FormattedText format tags.
drawBackground (Optional)
Type: SystemBoolean
See Also

Reference

Canvas Class
DrawText Overload
Duality.Drawing Namespace


Canvas.DrawText Method (FormattedText, VertexC1P3T2[][], VertexC1P3T2[], Single, Single, Single, BatchInfo, Alignment, Boolean)

CanvasDrawText Method (FormattedText, VertexC1P3T2, VertexC1P3T2, Single, Single, Single, BatchInfo, Alignment, Boolean)
Draws the specified formatted text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawText(
    FormattedText text,
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcon,
    float x,
    float y,
    float z = 0f,
    BatchInfo iconMat = null,
    Alignment blockAlign = Alignment.TopLeft,
    bool drawBackground = false
)

Parameters

text
Type: Duality.DrawingFormattedText
vertText
Type: Duality.DrawingVertexC1P3T2
Optional vertex cache to use for the text. If set, the texts vertices are cached and re-used for better Profile.
vertIcon
Type: Duality.DrawingVertexC1P3T2
Optional vertex cache to use for the icons. If set, the texts vertices are cached and re-used for better Profile.
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
iconMat (Optional)
Type: Duality.DrawingBatchInfo
blockAlign (Optional)
Type: DualityAlignment
Specifies the alignment of the text block. To make use of individual line alignment, make use of FormattedText format tags.
drawBackground (Optional)
Type: SystemBoolean
See Also

Reference

Canvas Class
DrawText Overload
Duality.Drawing Namespace


Canvas.DrawThickLine Method

CanvasDrawThickLine Method
Overload List
 | Name | Description
Public method | DrawThickLine(Single, Single, Single, Single, Single) | Draws a thick, flat line.
Public method | DrawThickLine(Single, Single, Single, Single, Single, Single, Single) | Draws a thick, three-dimensional line.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawThickLine Method (Single, Single, Single, Single, Single)

CanvasDrawThickLine Method (Single, Single, Single, Single, Single)
Draws a thick, flat line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawThickLine(
    float x,
    float y,
    float x2,
    float y2,
    float width
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
width
Type: SystemSingle
See Also

Reference

Canvas Class
DrawThickLine Overload
Duality.Drawing Namespace


Canvas.DrawThickLine Method (Single, Single, Single, Single, Single, Single, Single)

CanvasDrawThickLine Method (Single, Single, Single, Single, Single, Single, Single)
Draws a thick, three-dimensional line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawThickLine(
    float x,
    float y,
    float z,
    float x2,
    float y2,
    float z2,
    float width
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
z2
Type: SystemSingle
width
Type: SystemSingle
See Also

Reference

Canvas Class
DrawThickLine Overload
Duality.Drawing Namespace


Canvas.DrawVertices(T) Method

CanvasDrawVerticesT Method
Draws a predefined set of vertices using the Canvas transformation.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawVertices<T>(
    T[] vertices,
    VertexMode mode
)
where T : struct, new(), IVertexData

Parameters

vertices
Type: T
mode
Type: Duality.DrawingVertexMode

Type Parameters

T
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillCircle Method

CanvasFillCircle Method
Overload List
 | Name | Description
Public method | FillCircle(Single, Single, Single) | Fills a circle.
Public method | FillCircle(Single, Single, Single, Single) | Fills a circle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillCircle Method (Single, Single, Single)

CanvasFillCircle Method (Single, Single, Single)
Fills a circle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillCircle(
    float x,
    float y,
    float r
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
r
Type: SystemSingle
See Also

Reference

Canvas Class
FillCircle Overload
Duality.Drawing Namespace


Canvas.FillCircle Method (Single, Single, Single, Single)

CanvasFillCircle Method (Single, Single, Single, Single)
Fills a circle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillCircle(
    float x,
    float y,
    float z,
    float radius
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
radius
Type: SystemSingle
See Also

Reference

Canvas Class
FillCircle Overload
Duality.Drawing Namespace


Canvas.FillCircleSegment Method

CanvasFillCircleSegment Method
Overload List
 | Name | Description
Public method | FillCircleSegment(Single, Single, Single, Single, Single) | Fills the section of a circle
Public method | FillCircleSegment(Single, Single, Single, Single, Single, Single, Single) | Fills the section of a circle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillCircleSegment Method (Single, Single, Single, Single, Single)

CanvasFillCircleSegment Method (Single, Single, Single, Single, Single)
Fills the section of a circle

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillCircleSegment(
    float x,
    float y,
    float r,
    float minAngle,
    float maxAngle
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
r
Type: SystemSingle
minAngle
Type: SystemSingle
maxAngle
Type: SystemSingle
See Also

Reference

Canvas Class
FillCircleSegment Overload
Duality.Drawing Namespace


Canvas.FillCircleSegment Method (Single, Single, Single, Single, Single, Single, Single)

CanvasFillCircleSegment Method (Single, Single, Single, Single, Single, Single, Single)
Fills the section of a circle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillCircleSegment(
    float x,
    float y,
    float z,
    float radius,
    float minAngle,
    float maxAngle,
    float donutWidth = 0f
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
radius
Type: SystemSingle
The circles radius.
minAngle
Type: SystemSingle
The circle segments minimum angle.
maxAngle
Type: SystemSingle
The circle segments maximum angle.
donutWidth (Optional)
Type: SystemSingle
If bigger than zero, a donut with the specified width is rendered instead of a completely filled circle area.
See Also

Reference

Canvas Class
FillCircleSegment Overload
Duality.Drawing Namespace


Canvas.FillOval Method

CanvasFillOval Method
Overload List
 | Name | Description
Public method | FillOval(Single, Single, Single, Single) | Fills an oval
Public method | FillOval(Single, Single, Single, Single, Single) | Fills an oval.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillOval Method (Single, Single, Single, Single)

CanvasFillOval Method (Single, Single, Single, Single)
Fills an oval

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillOval(
    float x,
    float y,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
FillOval Overload
Duality.Drawing Namespace


Canvas.FillOval Method (Single, Single, Single, Single, Single)

CanvasFillOval Method (Single, Single, Single, Single, Single)
Fills an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillOval(
    float x,
    float y,
    float z,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
FillOval Overload
Duality.Drawing Namespace


Canvas.FillOvalSegment Method

CanvasFillOvalSegment Method
Overload List
 | Name | Description
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Public method | FillOvalSegment(Single, Single, Single, Single, Single, Single, Single, Single) | Fills the section of an oval.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillOvalSegment Method (Single, Single, Single, Single, Single, Single)

CanvasFillOvalSegment Method (Single, Single, Single, Single, Single, Single)
Fills the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillOvalSegment(
    float x,
    float y,
    float width,
    float height,
    float minAngle,
    float maxAngle
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
The rendered ovals total width.
height
Type: SystemSingle
The rendered ovals total height.
minAngle
Type: SystemSingle
The oval segments minimum angle.
maxAngle
Type: SystemSingle
The oval segments maximum angle.
See Also

Reference

Canvas Class
FillOvalSegment Overload
Duality.Drawing Namespace


Canvas.FillOvalSegment Method (Single, Single, Single, Single, Single, Single, Single, Single)

CanvasFillOvalSegment Method (Single, Single, Single, Single, Single, Single, Single, Single)
Fills the section of an oval.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillOvalSegment(
    float x,
    float y,
    float z,
    float width,
    float height,
    float minAngle,
    float maxAngle,
    float donutWidth = 0f
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
width
Type: SystemSingle
The rendered ovals total width.
height
Type: SystemSingle
The rendered ovals total height.
minAngle
Type: SystemSingle
The oval segments minimum angle.
maxAngle
Type: SystemSingle
The oval segments maximum angle.
donutWidth (Optional)
Type: SystemSingle
If bigger than zero, a donut with the specified width is rendered instead of a completely filled oval.
See Also

Reference

Canvas Class
FillOvalSegment Overload
Duality.Drawing Namespace


Canvas.FillPolygon Method

CanvasFillPolygon Method
Fills a polygon. All vertices share the same Z value, and the polygon needs to be convex.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillPolygon(
    Vector2[] points,
    float x,
    float y,
    float z = 0f
)

Parameters

points
Type: DualityVector2
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillPolygonOutline Method

CanvasFillPolygonOutline Method
Fills a polygons outline. All vertices share the same Z value.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillPolygonOutline(
    Vector2[] points,
    float width,
    float x,
    float y,
    float z = 0f
)

Parameters

points
Type: DualityVector2
width
Type: SystemSingle
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillRect Method

CanvasFillRect Method
Overload List
 | Name | Description
Public method | FillRect(Single, Single, Single, Single) | Fills a rectangle.
Public method | FillRect(Single, Single, Single, Single, Single) | Fills a rectangle.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillRect Method (Single, Single, Single, Single)

CanvasFillRect Method (Single, Single, Single, Single)
Fills a rectangle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillRect(
    float x,
    float y,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
FillRect Overload
Duality.Drawing Namespace


Canvas.FillRect Method (Single, Single, Single, Single, Single)

CanvasFillRect Method (Single, Single, Single, Single, Single)
Fills a rectangle.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillRect(
    float x,
    float y,
    float z,
    float width,
    float height
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Canvas Class
FillRect Overload
Duality.Drawing Namespace


Canvas.FillThickLine Method

CanvasFillThickLine Method
Overload List
 | Name | Description
Public method | FillThickLine(Single, Single, Single, Single, Single) | Fills a thick, flat line.
Public method | FillThickLine(Single, Single, Single, Single, Single, Single, Single) | Fills a three-dimensional line.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.FillThickLine Method (Single, Single, Single, Single, Single)

CanvasFillThickLine Method (Single, Single, Single, Single, Single)
Fills a thick, flat line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillThickLine(
    float x,
    float y,
    float x2,
    float y2,
    float width
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
width
Type: SystemSingle
See Also

Reference

Canvas Class
FillThickLine Overload
Duality.Drawing Namespace


Canvas.FillThickLine Method (Single, Single, Single, Single, Single, Single, Single)

CanvasFillThickLine Method (Single, Single, Single, Single, Single, Single, Single)
Fills a three-dimensional line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillThickLine(
    float x,
    float y,
    float z,
    float x2,
    float y2,
    float z2,
    float width
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
z
Type: SystemSingle
x2
Type: SystemSingle
y2
Type: SystemSingle
z2
Type: SystemSingle
width
Type: SystemSingle
See Also

Reference

Canvas Class
FillThickLine Overload
Duality.Drawing Namespace


Canvas.FillThickLineStrip Method

CanvasFillThickLineStrip Method
Fills a thick line strip. All vertices share the same Z value.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void FillThickLineStrip(
    Vector2[] points,
    float width,
    float x,
    float y,
    float z = 0f
)

Parameters

points
Type: DualityVector2
width
Type: SystemSingle
x
Type: SystemSingle
y
Type: SystemSingle
z (Optional)
Type: SystemSingle
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.MeasureText Method

CanvasMeasureText Method
Overload List
 | Name | Description
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Public method | MeasureText(String) | Measures the specified text using the currently used Font.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.MeasureText Method (String)

CanvasMeasureText Method (String)
Measures the specified text using the currently used Font.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MeasureText(
    string text
)

Parameters

text
Type: SystemString

Return Value

Type: Vector2
See Also

Reference

Canvas Class
MeasureText Overload
Duality.Drawing Namespace


Canvas.MeasureText Method (String[])

CanvasMeasureText Method (String)
Measures the specified text using the currently used Font.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MeasureText(
    string[] text
)

Parameters

text
Type: SystemString

Return Value

Type: Vector2
See Also

Reference

Canvas Class
MeasureText Overload
Duality.Drawing Namespace


Canvas.PopState Method

CanvasPopState Method
Removes the topmost CanvasState from the internal State stack.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PopState()
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.PushState Method

CanvasPushState Method
Adds a clone of the current state on top of the internal CanvasState stack.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PushState()
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.RequestVertexArray Method

CanvasRequestVertexArray Method
Creates or retrieves an unused vertex array with the specified minimum size. If the Canvas has been created using a valid CanvasBuffer, old vertex arrays will be re-used wherever possible.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexC1P3T2[] RequestVertexArray(
    int minSize
)

Parameters

minSize
Type: SystemInt32
The minimum size of the requested vertex array.

Return Value

Type: VertexC1P3T2
A vertex array with the specified minimum size. It may actually be larger.
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas Properties

Canvas Properties

The Canvas type exposes the following members.

Properties
 | Name | Description
Public property | DrawDevice | [GET] The underlying IDrawDevice that is used for drawing.
Public property | Height | [GET] The available height to draw on this Canvas.
Public property | State | [GET / SET] The Canvas' current CanvasState.
Public property | Width | [GET] The available width to draw on this Canvas.
Top
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.DrawDevice Property

CanvasDrawDevice Property
[GET] The underlying IDrawDevice that is used for drawing.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IDrawDevice DrawDevice { get; }

Property Value

Type: IDrawDevice
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.Height Property

CanvasHeight Property
[GET] The available height to draw on this Canvas.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.State Property

CanvasState Property
[GET / SET] The Canvas' current CanvasState.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CanvasState State { get; set; }

Property Value

Type: CanvasState
See Also

Reference

Canvas Class
Duality.Drawing Namespace


Canvas.Width Property

CanvasWidth Property
[GET] The available width to draw on this Canvas.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; }

Property Value

Type: Int32
See Also

Reference

Canvas Class
Duality.Drawing Namespace


CanvasBuffer Class

CanvasBuffer Class
This class handles buffering and reusing vertex arrays created by a Canvas and is a measure of performance and memory footprint improvement when using Canvas on a regular basis.
Inheritance Hierarchy
SystemObject
Duality.DrawingCanvasBuffer

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CanvasBuffer

The CanvasBuffer type exposes the following members.

Constructors
 | Name | Description
Public method | CanvasBuffer | Initializes a new instance of the CanvasBuffer class
Top
Methods
 | Name | Description
Public method | AddVertexArray | Adds the specified vertex array to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.
Public method | AddVertexArrays | Adds the specified vertex arrays to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.
Public method | RemoveVertexArray | Removes the specified vertex array from the Canvas' buffering mechanism.
Public method | RequestVertexArray | Creates or retrieves a vertex array of at least the specified size.
Public method | Reset | Resets the buffer for being re-used in future rendering frames.
Top
See Also

Reference

Duality.Drawing Namespace


CanvasBuffer Constructor

CanvasBuffer Constructor
Initializes a new instance of the CanvasBuffer class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CanvasBuffer()
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer Methods

CanvasBuffer Methods

The CanvasBuffer type exposes the following members.

Methods
 | Name | Description
Public method | AddVertexArray | Adds the specified vertex array to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.
Public method | AddVertexArrays | Adds the specified vertex arrays to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.
Public method | RemoveVertexArray | Removes the specified vertex array from the Canvas' buffering mechanism.
Public method | RequestVertexArray | Creates or retrieves a vertex array of at least the specified size.
Public method | Reset | Resets the buffer for being re-used in future rendering frames.
Top
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer.AddVertexArray Method

CanvasBufferAddVertexArray Method
Adds the specified vertex array to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertexArray(
    RawList<VertexC1P3T2> array
)

Parameters

array
Type: DualityRawList VertexC1P3T2
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer.AddVertexArrays Method

CanvasBufferAddVertexArrays Method
Adds the specified vertex arrays to the Canvas' buffering mechanism. As long as buffers are available, the Canvas will prefer re-using one of them over creating a new vertex array. Every vertex array will only be used once.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertexArrays(
    IEnumerable<RawList<VertexC1P3T2>> arrays
)

Parameters

arrays
Type: System.Collections.GenericIEnumerable RawList VertexC1P3T2
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer.RemoveVertexArray Method

CanvasBufferRemoveVertexArray Method
Removes the specified vertex array from the Canvas' buffering mechanism.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RemoveVertexArray(
    RawList<VertexC1P3T2> array
)

Parameters

array
Type: DualityRawList VertexC1P3T2

Return Value

Type: Boolean
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer.RequestVertexArray Method

CanvasBufferRequestVertexArray Method
Creates or retrieves a vertex array of at least the specified size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexC1P3T2[] RequestVertexArray(
    int desiredSize
)

Parameters

desiredSize
Type: SystemInt32
Minimum size of the new or reused vertex array.

Return Value

Type: VertexC1P3T2
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasBuffer.Reset Method

CanvasBufferReset Method
Resets the buffer for being re-used in future rendering frames.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Reset()
See Also

Reference

CanvasBuffer Class
Duality.Drawing Namespace


CanvasState Class

CanvasState Class
Describes the state of a Canvas.
Inheritance Hierarchy
SystemObject
Duality.DrawingCanvasState

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class CanvasState : ICloneExplicit

The CanvasState type exposes the following members.

Constructors
 | Name | Description
Public method | CanvasState | Initializes a new instance of the CanvasState class
Public method | CanvasState(CanvasState) | Initializes a new instance of the CanvasState class
Top
Methods
 | Name | Description
Public method | Clone | Creates a clone of this State.
Public method | CopyTo | Copies all state data to the specified target.
Public method | Reset | Resets this State to its initial settings.
Public method | SetMaterial(BatchInfo) | Sets the States drawing material.
Public method | SetMaterial(ContentRefMaterial) | Sets the States drawing material.
Top
Properties
 | Name | Description
Public property | ColorTint | [GET / SET] The color tint to use for drawing.
Public property | IsDefaultMaterial | [GET] Returns whether the currently active material is the default one.
Public property | IsTransformIdentity | [GET] Returns whether the current transformation is an identity transformation (i.e. doesn't do anything).
Public property | Material | [GET] The material that is used for drawing.
Public property | TextFont | [GET / SET] The Font to use for text rendering.
Public property | TextInvariantScale | [GET / SET] If true, text does not scale due to its position in space
Public property | TextureBaseSize | [GET] The currently bound main textures size.
Public property | TextureCoordinateRect | [GET / SET] The texture coordinate rect which is used for UV generation when drawing shapes.
Public property | TransformAngle | [GET / SET] The angle by which all shapes are transformed locally.
Public property | TransformHandle | [GET / SET] The handle used for locally transforming all shapes. You can think of it as the "fixed point" of a shape when rotating or scaling it.
Public property | TransformScale | [GET / SET] The scale by which all shapes are transformed locally.
Public property | ZOffset | [GET / SET] A Z-Offset value that is added to each emitted vertices Z coordinate after all projection calculations have been done.
Top
See Also

Reference

Duality.Drawing Namespace


CanvasState Constructor

CanvasState Constructor
Overload List
 | Name | Description
Public method | CanvasState | Initializes a new instance of the CanvasState class
Public method | CanvasState(CanvasState) | Initializes a new instance of the CanvasState class
Top
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState Constructor

CanvasState Constructor
Initializes a new instance of the CanvasState class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CanvasState()
See Also

Reference

CanvasState Class
CanvasState Overload
Duality.Drawing Namespace


CanvasState Constructor (CanvasState)

CanvasState Constructor (CanvasState)
Initializes a new instance of the CanvasState class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CanvasState(
    CanvasState other
)

Parameters

other
Type: Duality.DrawingCanvasState
See Also

Reference

CanvasState Class
CanvasState Overload
Duality.Drawing Namespace


CanvasState Methods

CanvasState Methods

The CanvasState type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a clone of this State.
Public method | CopyTo | Copies all state data to the specified target.
Public method | Reset | Resets this State to its initial settings.
Public method | SetMaterial(BatchInfo) | Sets the States drawing material.
Public method | SetMaterial(ContentRefMaterial) | Sets the States drawing material.
Top
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.Clone Method

CanvasStateClone Method
Creates a clone of this State.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public CanvasState Clone()

Return Value

Type: CanvasState
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.CopyTo Method

CanvasStateCopyTo Method
Copies all state data to the specified target.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    CanvasState target
)

Parameters

target
Type: Duality.DrawingCanvasState
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.Reset Method

CanvasStateReset Method
Resets this State to its initial settings.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Reset()
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.SetMaterial Method

CanvasStateSetMaterial Method
Overload List
 | Name | Description
Public method | SetMaterial(BatchInfo) | Sets the States drawing material.
Public method | SetMaterial(ContentRefMaterial) | Sets the States drawing material.
Top
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.SetMaterial Method (BatchInfo)

CanvasStateSetMaterial Method (BatchInfo)
Sets the States drawing material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetMaterial(
    BatchInfo material
)

Parameters

material
Type: Duality.DrawingBatchInfo
See Also

Reference

CanvasState Class
SetMaterial Overload
Duality.Drawing Namespace


CanvasState.SetMaterial Method (ContentRef(Material))

CanvasStateSetMaterial Method (ContentRefMaterial)
Sets the States drawing material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetMaterial(
    ContentRef<Material> material
)

Parameters

material
Type: DualityContentRef Material
See Also

Reference

CanvasState Class
SetMaterial Overload
Duality.Drawing Namespace


CanvasState Properties

CanvasState Properties

The CanvasState type exposes the following members.

Properties
 | Name | Description
Public property | ColorTint | [GET / SET] The color tint to use for drawing.
Public property | IsDefaultMaterial | [GET] Returns whether the currently active material is the default one.
Public property | IsTransformIdentity | [GET] Returns whether the current transformation is an identity transformation (i.e. doesn't do anything).
Public property | Material | [GET] The material that is used for drawing.
Public property | TextFont | [GET / SET] The Font to use for text rendering.
Public property | TextInvariantScale | [GET / SET] If true, text does not scale due to its position in space
Public property | TextureBaseSize | [GET] The currently bound main textures size.
Public property | TextureCoordinateRect | [GET / SET] The texture coordinate rect which is used for UV generation when drawing shapes.
Public property | TransformAngle | [GET / SET] The angle by which all shapes are transformed locally.
Public property | TransformHandle | [GET / SET] The handle used for locally transforming all shapes. You can think of it as the "fixed point" of a shape when rotating or scaling it.
Public property | TransformScale | [GET / SET] The scale by which all shapes are transformed locally.
Public property | ZOffset | [GET / SET] A Z-Offset value that is added to each emitted vertices Z coordinate after all projection calculations have been done.
Top
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.ColorTint Property

CanvasStateColorTint Property
[GET / SET] The color tint to use for drawing.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba ColorTint { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.IsDefaultMaterial Property

CanvasStateIsDefaultMaterial Property
[GET] Returns whether the currently active material is the default one.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsDefaultMaterial { get; }

Property Value

Type: Boolean
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.IsTransformIdentity Property

CanvasStateIsTransformIdentity Property
[GET] Returns whether the current transformation is an identity transformation (i.e. doesn't do anything).

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsTransformIdentity { get; }

Property Value

Type: Boolean
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.Material Property

CanvasStateMaterial Property
[GET] The material that is used for drawing.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo Material { get; }

Property Value

Type: BatchInfo
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TextFont Property

CanvasStateTextFont Property
[GET / SET] The Font to use for text rendering.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Font> TextFont { get; set; }

Property Value

Type: ContentRef Font
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TextInvariantScale Property

CanvasStateTextInvariantScale Property
[GET / SET] If true, text does not scale due to its position in space

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool TextInvariantScale { get; set; }

Property Value

Type: Boolean
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TextureBaseSize Property

CanvasStateTextureBaseSize Property
[GET] The currently bound main textures size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 TextureBaseSize { get; }

Property Value

Type: Vector2
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TextureCoordinateRect Property

CanvasStateTextureCoordinateRect Property
[GET / SET] The texture coordinate rect which is used for UV generation when drawing shapes.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect TextureCoordinateRect { get; set; }

Property Value

Type: Rect
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TransformAngle Property

CanvasStateTransformAngle Property
[GET / SET] The angle by which all shapes are transformed locally.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float TransformAngle { get; set; }

Property Value

Type: Single
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TransformHandle Property

CanvasStateTransformHandle Property
[GET / SET] The handle used for locally transforming all shapes. You can think of it as the "fixed point" of a shape when rotating or scaling it.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 TransformHandle { get; set; }

Property Value

Type: Vector2
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.TransformScale Property

CanvasStateTransformScale Property
[GET / SET] The scale by which all shapes are transformed locally.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 TransformScale { get; set; }

Property Value

Type: Vector2
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


CanvasState.ZOffset Property

CanvasStateZOffset Property
[GET / SET] A Z-Offset value that is added to each emitted vertices Z coordinate after all projection calculations have been done.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float ZOffset { get; set; }

Property Value

Type: Single
See Also

Reference

CanvasState Class
Duality.Drawing Namespace


ClearFlag Enumeration

ClearFlag Enumeration
A Bitmask describing which components of the current rendering buffer to clear.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum ClearFlag
Members
Member name | Value | Description
None | 0 | Nothing.
Color | 1 | The buffers color components.
Depth | 2 | The buffers depth component.
Default | 3 | The default set of flags.
All | 3 | All flags set.
See Also

Reference

Duality.Drawing Namespace


ColorDataElementType Enumeration

ColorDataElementType Enumeration
Describes the type of a color values individual elements (R, G, B, ...)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ColorDataElementType
Members
Member name | Value | Description
Byte | 0 |
Float | 1 |
See Also

Reference

Duality.Drawing Namespace


ColorDataLayout Enumeration

ColorDataLayout Enumeration
Describes the layout and purpose of color data values.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ColorDataLayout
Members
Member name | Value | Description
Rgba | 0 |
Bgra | 1 |
See Also

Reference

Duality.Drawing Namespace


ColorHsva Structure

ColorHsva Structure
Represents a 16-byte Hsva color value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct ColorHsva : IColorData, IEquatable<ColorHsva>

The ColorHsva type exposes the following members.

Constructors
 | Name | Description
Public method | ColorHsva(ColorHsva) | Creates a new color based on an existing one. This is basically a copy-constructor.
Public method | ColorHsva(Single, Single, Single, Single) | Creates a new color.
Top
Methods
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorHsva) | Returns whether this color equals the specified one.
 | FromIntArgb | Creates a new color based on an int-Argb value.
 | FromIntRgba | Creates a new color based on an int-Rgba value.
 | FromRgba | Creates a new color based on a Rgba value.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | GetLuminance | Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each (Rgba) color component differently.
Public method | SetIntArgb | Adjusts the color to match the specified int-Argb color.
Public method | SetIntRgba | Adjusts the color to match the specified int-Rgba color.
Public method | SetRgba | Adjusts the color to match the specified Rgba color.
Public method | ToIntArgb | Converts the color to int-Argb.
Public method | ToIntRgba | Converts the color to int-Rgba.
Public method | ToRgba | Converts the color to Rgba.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | WithAlpha | Returns a new version of the color with an adjusted alpha component.
Public method | WithHue | Returns a new version of the color with an adjusted hue component.
Public method | WithSaturation | Returns a new version of the color with an adjusted saturation component.
Public method | WithValue | Returns a new version of the color with an adjusted value component.
Top
Operators
Name | Description
Equality | Returns whether two colors are equal.
(Int32 to ColorHsva) |
(ColorHsva to Int32) |
(ColorHsva to ColorRgba) |
(ColorRgba to ColorHsva) |
Inequality | Returns whether two colors are unequal.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
Fields
 | Name | Description
Public field | A | Alpha component as float [0.0f - 1.0f].
 | Black | Black.
 | Blue | Fully saturated and max-brightness blue.
 | DarkGrey | A dark grey.
 | Green | Fully saturated and max-brightness green.
 | Grey | Medium grey.
Public field | H | Hue component as float [0.0f - 1.0f].
 | LightGrey | A light grey.
 | Red | Fully saturated and max-brightness red.
Public field | S | Saturation component as float [0.0f - 1.0f].
 | TransparentBlack | Transparent black. Completely invisible, when drawn, but might make a difference as a background color.
 | TransparentWhite | Transparent white. Completely invisible, when drawn, but might make a difference as a background color.
Public field | V | Value component as float [0.0f - 1.0f].
 | VeryDarkGrey | A very dark grey.
 | VeryLightGrey | A very light grey.
 | White | White.
Top
See Also

Reference

Duality.Drawing Namespace


ColorHsva Constructor

ColorHsva Constructor
Overload List
 | Name | Description
Public method | ColorHsva(ColorHsva) | Creates a new color based on an existing one. This is basically a copy-constructor.
Public method | ColorHsva(Single, Single, Single, Single) | Creates a new color.
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva Constructor (ColorHsva)

ColorHsva Constructor (ColorHsva)
Creates a new color based on an existing one. This is basically a copy-constructor.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva(
    ColorHsva clr
)

Parameters

clr
Type: Duality.DrawingColorHsva
See Also

Reference

ColorHsva Structure
ColorHsva Overload
Duality.Drawing Namespace


ColorHsva Constructor (Single, Single, Single, Single)

ColorHsva Constructor (Single, Single, Single, Single)
Creates a new color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva(
    float h,
    float s,
    float v,
    float a = 1f
)

Parameters

h
Type: SystemSingle
Hue as float [0.0f - 1.0f].
s
Type: SystemSingle
Saturation as float [0.0f - 1.0f].
v
Type: SystemSingle
Value as float [0.0f - 1.0f].
a (Optional)
Type: SystemSingle
Alpha as float [0.0f - 1.0f].
See Also

Reference

ColorHsva Structure
ColorHsva Overload
Duality.Drawing Namespace


ColorHsva Fields

ColorHsva Fields

The ColorHsva type exposes the following members.

Fields
 | Name | Description
Public field | A | Alpha component as float [0.0f - 1.0f].
 | Black | Black.
 | Blue | Fully saturated and max-brightness blue.
 | DarkGrey | A dark grey.
 | Green | Fully saturated and max-brightness green.
 | Grey | Medium grey.
Public field | H | Hue component as float [0.0f - 1.0f].
 | LightGrey | A light grey.
 | Red | Fully saturated and max-brightness red.
Public field | S | Saturation component as float [0.0f - 1.0f].
 | TransparentBlack | Transparent black. Completely invisible, when drawn, but might make a difference as a background color.
 | TransparentWhite | Transparent white. Completely invisible, when drawn, but might make a difference as a background color.
Public field | V | Value component as float [0.0f - 1.0f].
 | VeryDarkGrey | A very dark grey.
 | VeryLightGrey | A very light grey.
 | White | White.
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.A Field

ColorHsvaA Field
Alpha component as float [0.0f - 1.0f].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float A

Field Value

Type: Single
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Black Field

ColorHsvaBlack Field
Black.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva Black

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Blue Field

ColorHsvaBlue Field
Fully saturated and max-brightness blue.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva Blue

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.DarkGrey Field

ColorHsvaDarkGrey Field
A dark grey.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva DarkGrey

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Green Field

ColorHsvaGreen Field
Fully saturated and max-brightness green.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva Green

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Grey Field

ColorHsvaGrey Field
Medium grey.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva Grey

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.H Field

ColorHsvaH Field
Hue component as float [0.0f - 1.0f].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float H

Field Value

Type: Single
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.LightGrey Field

ColorHsvaLightGrey Field
A light grey.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva LightGrey

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Red Field

ColorHsvaRed Field
Fully saturated and max-brightness red.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva Red

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.S Field

ColorHsvaS Field
Saturation component as float [0.0f - 1.0f].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float S

Field Value

Type: Single
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.TransparentBlack Field

ColorHsvaTransparentBlack Field
Transparent black. Completely invisible, when drawn, but might make a difference as a background color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva TransparentBlack

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.TransparentWhite Field

ColorHsvaTransparentWhite Field
Transparent white. Completely invisible, when drawn, but might make a difference as a background color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva TransparentWhite

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.V Field

ColorHsvaV Field
Value component as float [0.0f - 1.0f].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float V

Field Value

Type: Single
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.VeryDarkGrey Field

ColorHsvaVeryDarkGrey Field
A very dark grey.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva VeryDarkGrey

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.VeryLightGrey Field

ColorHsvaVeryLightGrey Field
A very light grey.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva VeryLightGrey

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.White Field

ColorHsvaWhite Field
White.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorHsva White

Field Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva Methods

ColorHsva Methods

The ColorHsva type exposes the following members.

Methods
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorHsva) | Returns whether this color equals the specified one.
 | FromIntArgb | Creates a new color based on an int-Argb value.
 | FromIntRgba | Creates a new color based on an int-Rgba value.
 | FromRgba | Creates a new color based on a Rgba value.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | GetLuminance | Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each (Rgba) color component differently.
Public method | SetIntArgb | Adjusts the color to match the specified int-Argb color.
Public method | SetIntRgba | Adjusts the color to match the specified int-Rgba color.
Public method | SetRgba | Adjusts the color to match the specified Rgba color.
Public method | ToIntArgb | Converts the color to int-Argb.
Public method | ToIntRgba | Converts the color to int-Rgba.
Public method | ToRgba | Converts the color to Rgba.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | WithAlpha | Returns a new version of the color with an adjusted alpha component.
Public method | WithHue | Returns a new version of the color with an adjusted hue component.
Public method | WithSaturation | Returns a new version of the color with an adjusted saturation component.
Public method | WithValue | Returns a new version of the color with an adjusted value component.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Equals Method

ColorHsvaEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorHsva) | Returns whether this color equals the specified one.
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Equals Method (Object)

ColorHsvaEquals Method (Object)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

ColorHsva Structure
Equals Overload
Duality.Drawing Namespace


ColorHsva.Equals Method (ColorHsva)

ColorHsvaEquals Method (ColorHsva)
Returns whether this color equals the specified one.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    ColorHsva other
)

Parameters

other
Type: Duality.DrawingColorHsva

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

ColorHsva Structure
Equals Overload
Duality.Drawing Namespace


ColorHsva.FromIntArgb Method

ColorHsvaFromIntArgb Method
Creates a new color based on an int-Argb value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorHsva FromIntArgb(
    int argb
)

Parameters

argb
Type: SystemInt32

Return Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.FromIntRgba Method

ColorHsvaFromIntRgba Method
Creates a new color based on an int-Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorHsva FromIntRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32

Return Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.FromRgba Method

ColorHsvaFromRgba Method
Creates a new color based on a Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorHsva FromRgba(
    ColorRgba rgba
)

Parameters

rgba
Type: Duality.DrawingColorRgba

Return Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.GetHashCode Method

ColorHsvaGetHashCode Method

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.GetLuminance Method

ColorHsvaGetLuminance Method
Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each (Rgba) color component differently.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float GetLuminance()

Return Value

Type: Single
The colors luminance as float [0.0f - 1.0f].
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.SetIntArgb Method

ColorHsvaSetIntArgb Method
Adjusts the color to match the specified int-Argb color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetIntArgb(
    int argb
)

Parameters

argb
Type: SystemInt32

Implements

IColorDataSetIntArgb(Int32)
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.SetIntRgba Method

ColorHsvaSetIntRgba Method
Adjusts the color to match the specified int-Rgba color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetIntRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32

Implements

IColorDataSetIntRgba(Int32)
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.SetRgba Method

ColorHsvaSetRgba Method
Adjusts the color to match the specified Rgba color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetRgba(
    ColorRgba rgba
)

Parameters

rgba
Type: Duality.DrawingColorRgba
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.ToIntArgb Method

ColorHsvaToIntArgb Method
Converts the color to int-Argb.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int ToIntArgb()

Return Value

Type: Int32

Implements

IColorDataToIntArgb
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.ToIntRgba Method

ColorHsvaToIntRgba Method
Converts the color to int-Rgba.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int ToIntRgba()

Return Value

Type: Int32

Implements

IColorDataToIntRgba
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.ToRgba Method

ColorHsvaToRgba Method
Converts the color to Rgba.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba ToRgba()

Return Value

Type: ColorRgba
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.ToString Method

ColorHsvaToString Method

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.WithAlpha Method

ColorHsvaWithAlpha Method
Returns a new version of the color with an adjusted alpha component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva WithAlpha(
    float a
)

Parameters

a
Type: SystemSingle
The new alpha component as float [0.0f - 1.0f].

Return Value

Type: ColorHsva
A new color with the specified adjustments.
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.WithHue Method

ColorHsvaWithHue Method
Returns a new version of the color with an adjusted hue component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva WithHue(
    float h
)

Parameters

h
Type: SystemSingle
The new hue component as float [0.0f - 1.0f].

Return Value

Type: ColorHsva
A new color with the specified adjustments.
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.WithSaturation Method

ColorHsvaWithSaturation Method
Returns a new version of the color with an adjusted saturation component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva WithSaturation(
    float s
)

Parameters

s
Type: SystemSingle
The new saturation component as float [0.0f - 1.0f].

Return Value

Type: ColorHsva
A new color with the specified adjustments.
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.WithValue Method

ColorHsvaWithValue Method
Returns a new version of the color with an adjusted value component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva WithValue(
    float v
)

Parameters

v
Type: SystemSingle
The new value component as float [0.0f - 1.0f].

Return Value

Type: ColorHsva
A new color with the specified adjustments.
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva Operators and Type Conversions

ColorHsva Operators and Type Conversions

The ColorHsva type exposes the following members.

Operators
Name | Description
Equality | Returns whether two colors are equal.
(Int32 to ColorHsva) |
(ColorHsva to Int32) |
(ColorHsva to ColorRgba) |
(ColorRgba to ColorHsva) |
Inequality | Returns whether two colors are unequal.
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva.Equality Operator

ColorHsvaEquality Operator
Returns whether two colors are equal.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    ColorHsva left,
    ColorHsva right
)

Parameters

left
Type: Duality.DrawingColorHsva
The first color.
right
Type: Duality.DrawingColorHsva
The second color.

Return Value

Type: Boolean
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva Explicit Conversion Operators

ColorHsva Conversion Operators
Overload List
Name | Description
(Int32 to ColorHsva) |
(ColorHsva to Int32) |
(ColorHsva to ColorRgba) |
(ColorRgba to ColorHsva) |
Top
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorHsva Explicit Conversion (Int32 to ColorHsva)

ColorHsva Conversion (Int32 to ColorHsva)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorHsva (
    int c
)

Parameters

c
Type: SystemInt32

Return Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Overload
Duality.Drawing Namespace


ColorHsva Explicit Conversion (ColorHsva to Int32)

ColorHsva Conversion (ColorHsva to Int32)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator int (
    ColorHsva c
)

Parameters

c
Type: Duality.DrawingColorHsva

Return Value

Type: Int32
See Also

Reference

ColorHsva Structure
Overload
Duality.Drawing Namespace


ColorHsva Explicit Conversion (ColorHsva to ColorRgba)

ColorHsva Conversion (ColorHsva to ColorRgba)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorRgba (
    ColorHsva c
)

Parameters

c
Type: Duality.DrawingColorHsva

Return Value

Type: ColorRgba
See Also

Reference

ColorHsva Structure
Overload
Duality.Drawing Namespace


ColorHsva Explicit Conversion (ColorRgba to ColorHsva)

ColorHsva Conversion (ColorRgba to ColorHsva)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorHsva (
    ColorRgba c
)

Parameters

c
Type: Duality.DrawingColorRgba

Return Value

Type: ColorHsva
See Also

Reference

ColorHsva Structure
Overload
Duality.Drawing Namespace


ColorHsva.Inequality Operator

ColorHsvaInequality Operator
Returns whether two colors are unequal.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    ColorHsva left,
    ColorHsva right
)

Parameters

left
Type: Duality.DrawingColorHsva
The first color.
right
Type: Duality.DrawingColorHsva
The second color.

Return Value

Type: Boolean
See Also

Reference

ColorHsva Structure
Duality.Drawing Namespace


ColorRgba Structure

ColorRgba Structure
Represents a 4-byte Rgba color value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public struct ColorRgba : IColorData, IEquatable<ColorRgba>

The ColorRgba type exposes the following members.

Constructors
 | Name | Description
Public method | ColorRgba(Int32) | Creates a new color based on an int-Rgba value.
Public method | ColorRgba(ColorRgba) | Creates a new color based on an existing one. This is basically a copy-constructor.
Public method | ColorRgba(Byte, Byte) | Creates a new color based on value (brightness) and alpha.
Public method | ColorRgba(Single, Single) | Creates a new color based on value (brightness) and alpha.
Public method | ColorRgba(Byte, Byte, Byte, Byte) | Creates a new color.
Public method | ColorRgba(Single, Single, Single, Single) | Creates a new color.
Top
Methods
 | Name | Description
 | Add | Adds two colors component-wise.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorRgba) | Returns whether this color equals the specified one.
 | FromHsva | Creates a new color based on a Hsva value.
 | FromIntArgb | Creates a new color based on an int-Argb value.
 | FromIntRgba | Creates a new color based on an int-Rgba value.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | GetLuminance | Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each color component differently.
 | Lerp | Mixes two colors by performing a linear interpolation between both.
 | Multiply | Multiplies two colors component-wise.
 | Scale | Scales a color by the specified factor. This affects color and alpha equally.
Public method | SetHsva | Adjusts the color to match the specified Hsva color.
Public method | SetIntArgb | Adjusts the color to match the specified int-Argb color.
Public method | SetIntRgba | Adjusts the color to match the specified int-Rgba color.
 | Subtract | Subtracts two colors component-wise.
Public method | ToHsva | Converts the color to Hsva.
Public method | ToIntArgb | Converts the color to int-Argb.
Public method | ToIntRgba | Converts the color to int-Rgba.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | WithAlpha(Byte) | Returns a new version of the color with an adjusted alpha component.
Public method | WithAlpha(Single) | Returns a new version of the color with an adjusted alpha component.
Public method | WithBlue(Byte) | Returns a new version of the color with an adjusted blue component.
Public method | WithBlue(Single) | Returns a new version of the color with an adjusted blue component.
Public method | WithGreen(Byte) | Returns a new version of the color with an adjusted green component.
Public method | WithGreen(Single) | Returns a new version of the color with an adjusted green component.
Public method | WithRed(Byte) | Returns a new version of the color with an adjusted red component.
Public method | WithRed(Single) | Returns a new version of the color with an adjusted red component.
Top
Operators
Name | Description
Addition | Adds two colors component-wise.
Equality | Returns whether two colors are equal.
(Int32 to ColorRgba) |
(ColorHsva to ColorRgba) |
(ColorRgba to Int32) |
(ColorRgba to ColorHsva) |
Inequality | Returns whether two colors are unequal.
Multiply(ColorRgba, ColorRgba) | Multiplies two colors component-wise.
Multiply(ColorRgba, Single) | Scales a color by the specified factor. This affects color and alpha equally.
Subtraction | Subtracts the second color from the first component-wise.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
Fields
 | Name | Description
Public field | A | Alpha color component. Usually treated as opacity.
Public field | B | Blue color component.
 | Black | Black.
 | Blue | Fully saturated and max-brightness blue. Also known as [0,0,255].
 | DarkGrey | A dark grey. Value: 64.
Public field | G | Green color component.
 | Green | Fully saturated and max-brightness green. Also known as [0,255,0].
 | Grey | Medium grey. Value: 128.
 | LightGrey | A light grey. Value: 192.
Public field | R | Red color component.
 | Red | Fully saturated and max-brightness red. Also known as [255,0,0].
 | TransparentBlack | Transparent black. Completely invisible, when drawn, but might make a difference as a background color.
 | TransparentWhite | Transparent white. Completely invisible, when drawn, but might make a difference as a background color.
 | VeryDarkGrey | A very dark grey. Value: 32.
 | VeryLightGrey | A very light grey. Value: 224.
 | White | White.
Top
See Also

Reference

Duality.Drawing Namespace


ColorRgba Constructor

ColorRgba Constructor
Overload List
 | Name | Description
Public method | ColorRgba(Int32) | Creates a new color based on an int-Rgba value.
Public method | ColorRgba(ColorRgba) | Creates a new color based on an existing one. This is basically a copy-constructor.
Public method | ColorRgba(Byte, Byte) | Creates a new color based on value (brightness) and alpha.
Public method | ColorRgba(Single, Single) | Creates a new color based on value (brightness) and alpha.
Public method | ColorRgba(Byte, Byte, Byte, Byte) | Creates a new color.
Public method | ColorRgba(Single, Single, Single, Single) | Creates a new color.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba Constructor (Int32)

ColorRgba Constructor (Int32)
Creates a new color based on an int-Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Constructor (ColorRgba)

ColorRgba Constructor (ColorRgba)
Creates a new color based on an existing one. This is basically a copy-constructor.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    ColorRgba clr
)

Parameters

clr
Type: Duality.DrawingColorRgba
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Constructor (Byte, Byte)

ColorRgba Constructor (Byte, Byte)
Creates a new color based on value (brightness) and alpha.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    byte value,
    byte a = 255
)

Parameters

value
Type: SystemByte
The value / brightness of the color.
a (Optional)
Type: SystemByte
The colors alpha value.
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Constructor (Single, Single)

ColorRgba Constructor (Single, Single)
Creates a new color based on value (brightness) and alpha.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    float value,
    float a = 1f
)

Parameters

value
Type: SystemSingle
The value / brightness of the color as float [0.0f - 1.0f].
a (Optional)
Type: SystemSingle
The colors alpha value as float [0.0f - 1.0f].
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Constructor (Byte, Byte, Byte, Byte)

ColorRgba Constructor (Byte, Byte, Byte, Byte)
Creates a new color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    byte r,
    byte g,
    byte b,
    byte a = 255
)

Parameters

r
Type: SystemByte
The red component.
g
Type: SystemByte
The green component.
b
Type: SystemByte
The blue component.
a (Optional)
Type: SystemByte
The alpha component.
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Constructor (Single, Single, Single, Single)

ColorRgba Constructor (Single, Single, Single, Single)
Creates a new color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba(
    float r,
    float g,
    float b,
    float a = 1f
)

Parameters

r
Type: SystemSingle
The red component as float [0.0f - 1.0f].
g
Type: SystemSingle
The green component as float [0.0f - 1.0f].
b
Type: SystemSingle
The blue component as float [0.0f - 1.0f].
a (Optional)
Type: SystemSingle
The alpha component as float [0.0f - 1.0f].
See Also

Reference

ColorRgba Structure
ColorRgba Overload
Duality.Drawing Namespace


ColorRgba Fields

ColorRgba Fields

The ColorRgba type exposes the following members.

Fields
 | Name | Description
Public field | A | Alpha color component. Usually treated as opacity.
Public field | B | Blue color component.
 | Black | Black.
 | Blue | Fully saturated and max-brightness blue. Also known as [0,0,255].
 | DarkGrey | A dark grey. Value: 64.
Public field | G | Green color component.
 | Green | Fully saturated and max-brightness green. Also known as [0,255,0].
 | Grey | Medium grey. Value: 128.
 | LightGrey | A light grey. Value: 192.
Public field | R | Red color component.
 | Red | Fully saturated and max-brightness red. Also known as [255,0,0].
 | TransparentBlack | Transparent black. Completely invisible, when drawn, but might make a difference as a background color.
 | TransparentWhite | Transparent white. Completely invisible, when drawn, but might make a difference as a background color.
 | VeryDarkGrey | A very dark grey. Value: 32.
 | VeryLightGrey | A very light grey. Value: 224.
 | White | White.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.A Field

ColorRgbaA Field
Alpha color component. Usually treated as opacity.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public byte A

Field Value

Type: Byte
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.B Field

ColorRgbaB Field
Blue color component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public byte B

Field Value

Type: Byte
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Black Field

ColorRgbaBlack Field
Black.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba Black

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Blue Field

ColorRgbaBlue Field
Fully saturated and max-brightness blue. Also known as [0,0,255].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba Blue

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.DarkGrey Field

ColorRgbaDarkGrey Field
A dark grey. Value: 64.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba DarkGrey

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.G Field

ColorRgbaG Field
Green color component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public byte G

Field Value

Type: Byte
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Green Field

ColorRgbaGreen Field
Fully saturated and max-brightness green. Also known as [0,255,0].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba Green

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Grey Field

ColorRgbaGrey Field
Medium grey. Value: 128.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba Grey

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.LightGrey Field

ColorRgbaLightGrey Field
A light grey. Value: 192.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba LightGrey

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.R Field

ColorRgbaR Field
Red color component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public byte R

Field Value

Type: Byte
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Red Field

ColorRgbaRed Field
Fully saturated and max-brightness red. Also known as [255,0,0].

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba Red

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.TransparentBlack Field

ColorRgbaTransparentBlack Field
Transparent black. Completely invisible, when drawn, but might make a difference as a background color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba TransparentBlack

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.TransparentWhite Field

ColorRgbaTransparentWhite Field
Transparent white. Completely invisible, when drawn, but might make a difference as a background color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba TransparentWhite

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.VeryDarkGrey Field

ColorRgbaVeryDarkGrey Field
A very dark grey. Value: 32.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba VeryDarkGrey

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.VeryLightGrey Field

ColorRgbaVeryLightGrey Field
A very light grey. Value: 224.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba VeryLightGrey

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.White Field

ColorRgbaWhite Field
White.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static readonly ColorRgba White

Field Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba Methods

ColorRgba Methods

The ColorRgba type exposes the following members.

Methods
 | Name | Description
 | Add | Adds two colors component-wise.
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorRgba) | Returns whether this color equals the specified one.
 | FromHsva | Creates a new color based on a Hsva value.
 | FromIntArgb | Creates a new color based on an int-Argb value.
 | FromIntRgba | Creates a new color based on an int-Rgba value.
Public method | GetHashCode | (Overrides ValueTypeGetHashCode.)
Public method | GetLuminance | Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each color component differently.
 | Lerp | Mixes two colors by performing a linear interpolation between both.
 | Multiply | Multiplies two colors component-wise.
 | Scale | Scales a color by the specified factor. This affects color and alpha equally.
Public method | SetHsva | Adjusts the color to match the specified Hsva color.
Public method | SetIntArgb | Adjusts the color to match the specified int-Argb color.
Public method | SetIntRgba | Adjusts the color to match the specified int-Rgba color.
 | Subtract | Subtracts two colors component-wise.
Public method | ToHsva | Converts the color to Hsva.
Public method | ToIntArgb | Converts the color to int-Argb.
Public method | ToIntRgba | Converts the color to int-Rgba.
Public method | ToString | (Overrides ValueTypeToString.)
Public method | WithAlpha(Byte) | Returns a new version of the color with an adjusted alpha component.
Public method | WithAlpha(Single) | Returns a new version of the color with an adjusted alpha component.
Public method | WithBlue(Byte) | Returns a new version of the color with an adjusted blue component.
Public method | WithBlue(Single) | Returns a new version of the color with an adjusted blue component.
Public method | WithGreen(Byte) | Returns a new version of the color with an adjusted green component.
Public method | WithGreen(Single) | Returns a new version of the color with an adjusted green component.
Public method | WithRed(Byte) | Returns a new version of the color with an adjusted red component.
Public method | WithRed(Single) | Returns a new version of the color with an adjusted red component.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Add Method

ColorRgbaAdd Method
Adds two colors component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Add(
    ref ColorRgba left,
    ref ColorRgba right,
    out ColorRgba result
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.
result
Type: Duality.DrawingColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Equals Method

ColorRgbaEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | (Overrides ValueTypeEquals(Object).)
Public method | Equals(ColorRgba) | Returns whether this color equals the specified one.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Equals Method (Object)

ColorRgbaEquals Method (Object)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

ColorRgba Structure
Equals Overload
Duality.Drawing Namespace


ColorRgba.Equals Method (ColorRgba)

ColorRgbaEquals Method (ColorRgba)
Returns whether this color equals the specified one.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public bool Equals(
    ColorRgba other
)

Parameters

other
Type: Duality.DrawingColorRgba

Return Value

Type: Boolean

Implements

IEquatableTEquals(T)
See Also

Reference

ColorRgba Structure
Equals Overload
Duality.Drawing Namespace


ColorRgba.FromHsva Method

ColorRgbaFromHsva Method
Creates a new color based on a Hsva value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba FromHsva(
    ColorHsva hsva
)

Parameters

hsva
Type: Duality.DrawingColorHsva

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.FromIntArgb Method

ColorRgbaFromIntArgb Method
Creates a new color based on an int-Argb value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba FromIntArgb(
    int argb
)

Parameters

argb
Type: SystemInt32

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.FromIntRgba Method

ColorRgbaFromIntRgba Method
Creates a new color based on an int-Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba FromIntRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.GetHashCode Method

ColorRgbaGetHashCode Method

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.GetLuminance Method

ColorRgbaGetLuminance Method
Calculates the colors luminance. It is an approximation on how bright the color actually looks to the human eye, weighting each color component differently.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public float GetLuminance()

Return Value

Type: Single
The colors luminance as float [0.0f - 1.0f].
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Lerp Method

ColorRgbaLerp Method
Mixes two colors by performing a linear interpolation between both.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba Lerp(
    ColorRgba first,
    ColorRgba second,
    float factor
)

Parameters

first
Type: Duality.DrawingColorRgba
The first color.
second
Type: Duality.DrawingColorRgba
The second color.
factor
Type: SystemSingle
The linear interpolation value. Zero equals the first color, one equals the second color.

Return Value

Type: ColorRgba
The interpolated / mixed color.
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Multiply Method

ColorRgbaMultiply Method
Multiplies two colors component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Multiply(
    ref ColorRgba left,
    ref ColorRgba right,
    out ColorRgba result
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.
result
Type: Duality.DrawingColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Scale Method

ColorRgbaScale Method
Scales a color by the specified factor. This affects color and alpha equally.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Scale(
    ref ColorRgba left,
    float right,
    out ColorRgba result
)

Parameters

left
Type: Duality.DrawingColorRgba
The color that is to be scaled.
right
Type: SystemSingle
The scaling factor.
result
Type: Duality.DrawingColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.SetHsva Method

ColorRgbaSetHsva Method
Adjusts the color to match the specified Hsva color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetHsva(
    ColorHsva hsva
)

Parameters

hsva
Type: Duality.DrawingColorHsva
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.SetIntArgb Method

ColorRgbaSetIntArgb Method
Adjusts the color to match the specified int-Argb color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetIntArgb(
    int argb
)

Parameters

argb
Type: SystemInt32

Implements

IColorDataSetIntArgb(Int32)
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.SetIntRgba Method

ColorRgbaSetIntRgba Method
Adjusts the color to match the specified int-Rgba color.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public void SetIntRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32

Implements

IColorDataSetIntRgba(Int32)
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Subtract Method

ColorRgbaSubtract Method
Subtracts two colors component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static void Subtract(
    ref ColorRgba left,
    ref ColorRgba right,
    out ColorRgba result
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.
result
Type: Duality.DrawingColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.ToHsva Method

ColorRgbaToHsva Method
Converts the color to Hsva.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorHsva ToHsva()

Return Value

Type: ColorHsva
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.ToIntArgb Method

ColorRgbaToIntArgb Method
Converts the color to int-Argb.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int ToIntArgb()

Return Value

Type: Int32

Implements

IColorDataToIntArgb
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.ToIntRgba Method

ColorRgbaToIntRgba Method
Converts the color to int-Rgba.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public int ToIntRgba()

Return Value

Type: Int32

Implements

IColorDataToIntRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.ToString Method

ColorRgbaToString Method

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.WithAlpha Method

ColorRgbaWithAlpha Method
Overload List
 | Name | Description
Public method | WithAlpha(Byte) | Returns a new version of the color with an adjusted alpha component.
Public method | WithAlpha(Single) | Returns a new version of the color with an adjusted alpha component.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.WithAlpha Method (Byte)

ColorRgbaWithAlpha Method (Byte)
Returns a new version of the color with an adjusted alpha component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithAlpha(
    byte a
)

Parameters

a
Type: SystemByte
The new alpha component.

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithAlpha Overload
Duality.Drawing Namespace


ColorRgba.WithAlpha Method (Single)

ColorRgbaWithAlpha Method (Single)
Returns a new version of the color with an adjusted alpha component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithAlpha(
    float a
)

Parameters

a
Type: SystemSingle
The new alpha component as float [0.0f - 1.0f].

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithAlpha Overload
Duality.Drawing Namespace


ColorRgba.WithBlue Method

ColorRgbaWithBlue Method
Overload List
 | Name | Description
Public method | WithBlue(Byte) | Returns a new version of the color with an adjusted blue component.
Public method | WithBlue(Single) | Returns a new version of the color with an adjusted blue component.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.WithBlue Method (Byte)

ColorRgbaWithBlue Method (Byte)
Returns a new version of the color with an adjusted blue component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithBlue(
    byte b
)

Parameters

b
Type: SystemByte
The new blue component.

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithBlue Overload
Duality.Drawing Namespace


ColorRgba.WithBlue Method (Single)

ColorRgbaWithBlue Method (Single)
Returns a new version of the color with an adjusted blue component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithBlue(
    float b
)

Parameters

b
Type: SystemSingle
The new blue component as float [0.0f - 1.0f].

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithBlue Overload
Duality.Drawing Namespace


ColorRgba.WithGreen Method

ColorRgbaWithGreen Method
Overload List
 | Name | Description
Public method | WithGreen(Byte) | Returns a new version of the color with an adjusted green component.
Public method | WithGreen(Single) | Returns a new version of the color with an adjusted green component.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.WithGreen Method (Byte)

ColorRgbaWithGreen Method (Byte)
Returns a new version of the color with an adjusted green component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithGreen(
    byte g
)

Parameters

g
Type: SystemByte
The new green component.

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithGreen Overload
Duality.Drawing Namespace


ColorRgba.WithGreen Method (Single)

ColorRgbaWithGreen Method (Single)
Returns a new version of the color with an adjusted green component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithGreen(
    float g
)

Parameters

g
Type: SystemSingle
The new green component as float [0.0f - 1.0f].

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithGreen Overload
Duality.Drawing Namespace


ColorRgba.WithRed Method

ColorRgbaWithRed Method
Overload List
 | Name | Description
Public method | WithRed(Byte) | Returns a new version of the color with an adjusted red component.
Public method | WithRed(Single) | Returns a new version of the color with an adjusted red component.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.WithRed Method (Byte)

ColorRgbaWithRed Method (Byte)
Returns a new version of the color with an adjusted red component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithRed(
    byte r
)

Parameters

r
Type: SystemByte
The new red component.

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithRed Overload
Duality.Drawing Namespace


ColorRgba.WithRed Method (Single)

ColorRgbaWithRed Method (Single)
Returns a new version of the color with an adjusted red component.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public ColorRgba WithRed(
    float r
)

Parameters

r
Type: SystemSingle
The new red component as float [0.0f - 1.0f].

Return Value

Type: ColorRgba
A new color with the specified adjustments.
See Also

Reference

ColorRgba Structure
WithRed Overload
Duality.Drawing Namespace


ColorRgba Operators and Type Conversions

ColorRgba Operators and Type Conversions

The ColorRgba type exposes the following members.

Operators
Name | Description
Addition | Adds two colors component-wise.
Equality | Returns whether two colors are equal.
(Int32 to ColorRgba) |
(ColorHsva to ColorRgba) |
(ColorRgba to Int32) |
(ColorRgba to ColorHsva) |
Inequality | Returns whether two colors are unequal.
Multiply(ColorRgba, ColorRgba) | Multiplies two colors component-wise.
Multiply(ColorRgba, Single) | Scales a color by the specified factor. This affects color and alpha equally.
Subtraction | Subtracts the second color from the first component-wise.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Addition Operator

ColorRgbaAddition Operator
Adds two colors component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba operator +(
    ColorRgba left,
    ColorRgba right
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Equality Operator

ColorRgbaEquality Operator
Returns whether two colors are equal.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator ==(
    ColorRgba left,
    ColorRgba right
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.

Return Value

Type: Boolean
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba Explicit Conversion Operators

ColorRgba Conversion Operators
Overload List
Name | Description
(Int32 to ColorRgba) |
(ColorHsva to ColorRgba) |
(ColorRgba to Int32) |
(ColorRgba to ColorHsva) |
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba Explicit Conversion (Int32 to ColorRgba)

ColorRgba Conversion (Int32 to ColorRgba)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorRgba (
    int c
)

Parameters

c
Type: SystemInt32

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Overload
Duality.Drawing Namespace


ColorRgba Explicit Conversion (ColorHsva to ColorRgba)

ColorRgba Conversion (ColorHsva to ColorRgba)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorRgba (
    ColorHsva c
)

Parameters

c
Type: Duality.DrawingColorHsva

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Overload
Duality.Drawing Namespace


ColorRgba Explicit Conversion (ColorRgba to Int32)

ColorRgba Conversion (ColorRgba to Int32)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator int (
    ColorRgba c
)

Parameters

c
Type: Duality.DrawingColorRgba

Return Value

Type: Int32
See Also

Reference

ColorRgba Structure
Overload
Duality.Drawing Namespace


ColorRgba Explicit Conversion (ColorRgba to ColorHsva)

ColorRgba Conversion (ColorRgba to ColorHsva)

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static explicit operator ColorHsva (
    ColorRgba c
)

Parameters

c
Type: Duality.DrawingColorRgba

Return Value

Type: ColorHsva
See Also

Reference

ColorRgba Structure
Overload
Duality.Drawing Namespace


ColorRgba.Inequality Operator

ColorRgbaInequality Operator
Returns whether two colors are unequal.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static bool operator !=(
    ColorRgba left,
    ColorRgba right
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.

Return Value

Type: Boolean
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Multiply Operator

ColorRgbaMultiply Operator
Overload List
Name | Description
Multiply(ColorRgba, ColorRgba) | Multiplies two colors component-wise.
Multiply(ColorRgba, Single) | Scales a color by the specified factor. This affects color and alpha equally.
Top
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


ColorRgba.Multiply Operator (ColorRgba, ColorRgba)

ColorRgbaMultiply Operator (ColorRgba, ColorRgba)
Multiplies two colors component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba operator *(
    ColorRgba left,
    ColorRgba right
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Multiply Overload
Duality.Drawing Namespace


ColorRgba.Multiply Operator (ColorRgba, Single)

ColorRgbaMultiply Operator (ColorRgba, Single)
Scales a color by the specified factor. This affects color and alpha equally.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba operator *(
    ColorRgba left,
    float right
)

Parameters

left
Type: Duality.DrawingColorRgba
The color to scale.
right
Type: SystemSingle
The scaling factor.

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Multiply Overload
Duality.Drawing Namespace


ColorRgba.Subtraction Operator

ColorRgbaSubtraction Operator
Subtracts the second color from the first component-wise.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public static ColorRgba operator -(
    ColorRgba left,
    ColorRgba right
)

Parameters

left
Type: Duality.DrawingColorRgba
The first color.
right
Type: Duality.DrawingColorRgba
The second color.

Return Value

Type: ColorRgba
See Also

Reference

ColorRgba Structure
Duality.Drawing Namespace


DashPattern Enumeration

DashPattern Enumeration
Describes a pattern for dashed lines.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum DashPattern
Members
Member name | Value | Description
Empty | 0 | There is no line at all.
DotMore | 2863311530 | A dotted line with a a lot of dots. Pattern: #_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
Dot | 2290649224 | A dotted line. Pattern: #___#___#___#___#___#___#___#___
DotLess | 2155905152 | A dotted line with less dots. Pattern: #_______#_______#_______#_______
DashShort | 3435973836 | A dashed line with short dashes. Pattern: ##__##__##__##__##__##__##__##__
Dash | 4042322160 | A dashed line. Pattern: ####____####____####____####____
DashLong | 4278255360 | A dashed line with long dashes. Pattern: ########________########________
DashDot | 3840206052 | A line with alternating dashes and dots. Pattern: ###__#__###__#__###__#__###__#__
DashDotDot | 4169726088 | An alternating line with more dots than dashes. Pattern: #####___#___#___#####___#___#___
DashDashDot | 4042322056 | An alternating line with more dashes than dots. Pattern: ####____####____####____#___#___
Full | 4294967295 | The line isn't dashed.
See Also

Reference

Duality.Drawing Namespace


DrawDevice Class

DrawDevice Class
Inheritance Hierarchy
SystemObject
Duality.DrawingDrawDevice

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DrawDevice : IDrawDevice, IDisposable

The DrawDevice type exposes the following members.

Constructors
 | Name | Description
Public method | DrawDevice | Initializes a new instance of the DrawDevice class
Top
Methods
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) |
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) |
Public method | Dispose | Releases all resources used by the DrawDevice
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsCoordInView |
Public method | PrepareForDrawcalls |
Public method | PreprocessCoords |
Public method | Render |
 | RenderVoid |
Public method | UpdateMatrices |
Top
Fields
Name | Description
DefaultFocusDist | The default reference distance for perspective rendering.
Top
Properties
 | Name | Description
Public property | DepthWrite |
Public property | Disposed |
Public property | FarZ |
Public property | FocusDist |
Public property | IsPicking |
Public property | NearZ |
Public property | Perspective | [GET / SET] Specified the perspective effect that is applied when rendering the world.
Public property | PickingIndex |
Public property | RefAngle |
Public property | RefCoord |
Public property | RenderMode |
Public property | Target |
Public property | TargetSize |
Public property | ViewportRect |
Public property | VisibilityMask |
Top
See Also

Reference

Duality.Drawing Namespace


DrawDevice Constructor

DrawDevice Constructor
Initializes a new instance of the DrawDevice class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DrawDevice()
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice Fields

DrawDevice Fields

The DrawDevice type exposes the following members.

Fields
Name | Description
DefaultFocusDist | The default reference distance for perspective rendering.
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.DefaultFocusDist Field

DrawDeviceDefaultFocusDist Field
The default reference distance for perspective rendering.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const float DefaultFocusDist

Field Value

Type: Single
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice Methods

DrawDevice Methods

The DrawDevice type exposes the following members.

Methods
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) |
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) |
Public method | Dispose |
Protected method | Finalize | (Overrides ObjectFinalize.)
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsCoordInView |
Public method | PrepareForDrawcalls |
Public method | PreprocessCoords |
Public method | Render |
 | RenderVoid |
Public method | UpdateMatrices |
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.AddVertices Method

DrawDeviceAddVertices Method
Overload List
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) |
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) |
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) |
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.AddVertices(T) Method (BatchInfo, VertexMode, T[])

DrawDeviceAddVerticesT Method (BatchInfo, VertexMode, T)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertices<T>(
    BatchInfo material,
    VertexMode vertexMode,
    params T[] vertices
)
where T : struct, new(), IVertexData

Parameters

material
Type: Duality.DrawingBatchInfo
vertexMode
Type: Duality.DrawingVertexMode
vertices
Type: T

Type Parameters

T

Implements

IDrawDeviceAddVerticesT(BatchInfo, VertexMode, T)
See Also

Reference

DrawDevice Class
AddVertices Overload
Duality.Drawing Namespace


DrawDevice.AddVertices(T) Method (ContentRef(Material), VertexMode, T[])

DrawDeviceAddVerticesT Method (ContentRefMaterial, VertexMode, T)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertices<T>(
    ContentRef<Material> material,
    VertexMode vertexMode,
    params T[] vertices
)
where T : struct, new(), IVertexData

Parameters

material
Type: DualityContentRef Material
vertexMode
Type: Duality.DrawingVertexMode
vertices
Type: T

Type Parameters

T

Implements

IDrawDeviceAddVerticesT(ContentRefMaterial, VertexMode, T)
See Also

Reference

DrawDevice Class
AddVertices Overload
Duality.Drawing Namespace


DrawDevice.AddVertices(T) Method (BatchInfo, VertexMode, T[], Int32)

DrawDeviceAddVerticesT Method (BatchInfo, VertexMode, T, Int32)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertices<T>(
    BatchInfo material,
    VertexMode vertexMode,
    T[] vertexBuffer,
    int vertexCount
)
where T : struct, new(), IVertexData

Parameters

material
Type: Duality.DrawingBatchInfo
vertexMode
Type: Duality.DrawingVertexMode
vertexBuffer
Type: T
vertexCount
Type: SystemInt32

Type Parameters

T

Implements

IDrawDeviceAddVerticesT(BatchInfo, VertexMode, T, Int32)
See Also

Reference

DrawDevice Class
AddVertices Overload
Duality.Drawing Namespace


DrawDevice.AddVertices(T) Method (ContentRef(Material), VertexMode, T[], Int32)

DrawDeviceAddVerticesT Method (ContentRefMaterial, VertexMode, T, Int32)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddVertices<T>(
    ContentRef<Material> material,
    VertexMode vertexMode,
    T[] vertexBuffer,
    int vertexCount
)
where T : struct, new(), IVertexData

Parameters

material
Type: DualityContentRef Material
vertexMode
Type: Duality.DrawingVertexMode
vertexBuffer
Type: T
vertexCount
Type: SystemInt32

Type Parameters

T

Implements

IDrawDeviceAddVerticesT(ContentRefMaterial, VertexMode, T, Int32)
See Also

Reference

DrawDevice Class
AddVertices Overload
Duality.Drawing Namespace


DrawDevice.Dispose Method

DrawDeviceDispose Method
Releases all resources used by the DrawDevice

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.Finalize Method

DrawDeviceFinalize Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.GetScaleAtZ Method

DrawDeviceGetScaleAtZ Method
Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float GetScaleAtZ(
    float z
)

Parameters

z
Type: SystemSingle

Return Value

Type: Single

Implements

IDrawDeviceGetScaleAtZ(Single)
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.GetScreenCoord Method

DrawDeviceGetScreenCoord Method
Overload List
 | Name | Description
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.GetScreenCoord Method (Vector2)

DrawDeviceGetScreenCoord Method (Vector2)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetScreenCoord(
    Vector2 spacePos
)

Parameters

spacePos
Type: DualityVector2

Return Value

Type: Vector3

Implements

IDrawDeviceGetScreenCoord(Vector2)
See Also

Reference

DrawDevice Class
GetScreenCoord Overload
Duality.Drawing Namespace


DrawDevice.GetScreenCoord Method (Vector3)

DrawDeviceGetScreenCoord Method (Vector3)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetScreenCoord(
    Vector3 spacePos
)

Parameters

spacePos
Type: DualityVector3

Return Value

Type: Vector3

Implements

IDrawDeviceGetScreenCoord(Vector3)
See Also

Reference

DrawDevice Class
GetScreenCoord Overload
Duality.Drawing Namespace


DrawDevice.GetSpaceCoord Method

DrawDeviceGetSpaceCoord Method
Overload List
 | Name | Description
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.GetSpaceCoord Method (Vector2)

DrawDeviceGetSpaceCoord Method (Vector2)
Transforms screen space coordinates to world space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetSpaceCoord(
    Vector2 screenPos
)

Parameters

screenPos
Type: DualityVector2

Return Value

Type: Vector3

Implements

IDrawDeviceGetSpaceCoord(Vector2)
See Also

Reference

DrawDevice Class
GetSpaceCoord Overload
Duality.Drawing Namespace


DrawDevice.GetSpaceCoord Method (Vector3)

DrawDeviceGetSpaceCoord Method (Vector3)
Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 GetSpaceCoord(
    Vector3 screenPos
)

Parameters

screenPos
Type: DualityVector3

Return Value

Type: Vector3

Implements

IDrawDeviceGetSpaceCoord(Vector3)
See Also

Reference

DrawDevice Class
GetSpaceCoord Overload
Duality.Drawing Namespace


DrawDevice.IsCoordInView Method

DrawDeviceIsCoordInView Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsCoordInView(
    Vector3 c,
    float boundRad
)

Parameters

c
Type: DualityVector3
boundRad
Type: SystemSingle

Return Value

Type: Boolean

Implements

IDrawDeviceIsCoordInView(Vector3, Single)
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.PrepareForDrawcalls Method

DrawDevicePrepareForDrawcalls Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PrepareForDrawcalls()
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.PreprocessCoords Method

DrawDevicePreprocessCoords Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PreprocessCoords(
    ref Vector3 pos,
    ref float scale
)

Parameters

pos
Type: DualityVector3
scale
Type: SystemSingle

Implements

IDrawDevicePreprocessCoords(Vector3, Single)
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.Render Method

DrawDeviceRender Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Render(
    ClearFlag clearFlags,
    ColorRgba clearColor,
    float clearDepth
)

Parameters

clearFlags
Type: Duality.DrawingClearFlag
clearColor
Type: Duality.DrawingColorRgba
clearDepth
Type: SystemSingle
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.RenderVoid Method

DrawDeviceRenderVoid Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void RenderVoid(
    Rect viewportRect
)

Parameters

viewportRect
Type: DualityRect
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.UpdateMatrices Method

DrawDeviceUpdateMatrices Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UpdateMatrices()
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice Properties

DrawDevice Properties

The DrawDevice type exposes the following members.

Properties
 | Name | Description
Public property | DepthWrite |
Public property | Disposed |
Public property | FarZ |
Public property | FocusDist |
Public property | IsPicking |
Public property | NearZ |
Public property | Perspective | [GET / SET] Specified the perspective effect that is applied when rendering the world.
Public property | PickingIndex |
Public property | RefAngle |
Public property | RefCoord |
Public property | RenderMode |
Public property | Target |
Public property | TargetSize |
Public property | ViewportRect |
Public property | VisibilityMask |
Top
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.DepthWrite Property

DrawDeviceDepthWrite Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool DepthWrite { get; }

Property Value

Type: Boolean

Implements

IDrawDeviceDepthWrite
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.Disposed Property

DrawDeviceDisposed Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.FarZ Property

DrawDeviceFarZ Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FarZ { get; set; }

Property Value

Type: Single

Implements

IDrawDeviceFarZ
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.FocusDist Property

DrawDeviceFocusDist Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FocusDist { get; set; }

Property Value

Type: Single

Implements

IDrawDeviceFocusDist
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.IsPicking Property

DrawDeviceIsPicking Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPicking { get; }

Property Value

Type: Boolean

Implements

IDrawDeviceIsPicking
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.NearZ Property

DrawDeviceNearZ Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float NearZ { get; set; }

Property Value

Type: Single

Implements

IDrawDeviceNearZ
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.Perspective Property

DrawDevicePerspective Property
[GET / SET] Specified the perspective effect that is applied when rendering the world.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PerspectiveMode Perspective { get; set; }

Property Value

Type: PerspectiveMode

Implements

IDrawDevicePerspective
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.PickingIndex Property

DrawDevicePickingIndex Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int PickingIndex { get; set; }

Property Value

Type: Int32
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.RefAngle Property

DrawDeviceRefAngle Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RefAngle { get; set; }

Property Value

Type: Single

Implements

IDrawDeviceRefAngle
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.RefCoord Property

DrawDeviceRefCoord Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 RefCoord { get; set; }

Property Value

Type: Vector3

Implements

IDrawDeviceRefCoord
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.RenderMode Property

DrawDeviceRenderMode Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderMatrix RenderMode { get; set; }

Property Value

Type: RenderMatrix
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.Target Property

DrawDeviceTarget Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<RenderTarget> Target { get; set; }

Property Value

Type: ContentRef RenderTarget
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.TargetSize Property

DrawDeviceTargetSize Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 TargetSize { get; }

Property Value

Type: Vector2

Implements

IDrawDeviceTargetSize
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.ViewportRect Property

DrawDeviceViewportRect Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect ViewportRect { get; set; }

Property Value

Type: Rect
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


DrawDevice.VisibilityMask Property

DrawDeviceVisibilityMask Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VisibilityFlag VisibilityMask { get; set; }

Property Value

Type: VisibilityFlag

Implements

IDrawDeviceVisibilityMask
See Also

Reference

DrawDevice Class
Duality.Drawing Namespace


ExtMethodsIColorData Class

ExtMethodsIColorData Class
Inheritance Hierarchy
SystemObject
Duality.DrawingExtMethodsIColorData

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsIColorData
Methods
Name | Description
ConvertTo(IColorData, Type) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
ConvertToT(IColorData) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
Top
See Also

Reference

Duality.Drawing Namespace


ExtMethodsIColorData Methods

ExtMethodsIColorData Methods
Methods
Name | Description
ConvertTo(IColorData, Type) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
ConvertToT(IColorData) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
Top
See Also

Reference

ExtMethodsIColorData Class
Duality.Drawing Namespace


ExtMethodsIColorData.ConvertTo Method

ExtMethodsIColorDataConvertTo Method
Overload List
Name | Description
ConvertToT(IColorData) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
ConvertTo(IColorData, Type) | Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.
Top
See Also

Reference

ExtMethodsIColorData Class
Duality.Drawing Namespace


ExtMethodsIColorData.ConvertTo(T) Method (IColorData)

ExtMethodsIColorDataConvertToT Method (IColorData)
Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T ConvertTo<T>(
    this IColorData source
)
where T : IColorData

Parameters

source
Type: Duality.DrawingIColorData

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IColorData. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIColorData Class
ConvertTo Overload
Duality.Drawing Namespace


ExtMethodsIColorData.ConvertTo Method (IColorData, Type)

ExtMethodsIColorDataConvertTo Method (IColorData, Type)
Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IColorData ConvertTo(
    this IColorData source,
    Type type
)

Parameters

source
Type: Duality.DrawingIColorData
type
Type: SystemType

Return Value

Type: IColorData

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IColorData. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsIColorData Class
ConvertTo Overload
Duality.Drawing Namespace


ExtMethodsVertexMode Class

ExtMethodsVertexMode Class
Inheritance Hierarchy
SystemObject
Duality.DrawingExtMethodsVertexMode

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsVertexMode

The ExtMethodsVertexMode type exposes the following members.

Methods
Name | Description
IsBatchableMode |
Top
See Also

Reference

Duality.Drawing Namespace


ExtMethodsVertexMode Methods

ExtMethodsVertexMode Methods

The ExtMethodsVertexMode type exposes the following members.

Methods
Name | Description
IsBatchableMode |
Top
See Also

Reference

ExtMethodsVertexMode Class
Duality.Drawing Namespace


ExtMethodsVertexMode.IsBatchableMode Method

ExtMethodsVertexModeIsBatchableMode Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsBatchableMode(
    this VertexMode mode
)

Parameters

mode
Type: Duality.DrawingVertexMode

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VertexMode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsVertexMode Class
Duality.Drawing Namespace


FitTextMode Enumeration

FitTextMode Enumeration
Specifies how a text fitting algorithm works.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum FitTextMode
Members
Member name | Value | Description
ByChar | 0 | Text is fit by character, i.e. can be separated anywhere.
ByWordLeadingSpace | 1 | Text is fit by word, preferring leading whitespaces.
ByWordTrailingSpace | 2 | Text is fit by word, preferring trailing whitespaces.
ByWord | 2 | Text is fit by word boundaries, i.e. can only be separated between words.
See Also

Reference

Duality.Drawing Namespace


FontStyle Enumeration

FontStyle Enumeration
Specifies the style of a text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum FontStyle
Members
Member name | Value | Description
Regular | 0 | Regular text.
Bold | 1 | Bold text.
Italic | 2 | Italic text.
See Also

Reference

Duality.Drawing Namespace


FormattedText Class

FormattedText Class
Provides functionality for analyzing, handling and displaying formatted text.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedText

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class FormattedText : ICloneExplicit

The FormattedText type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedText | Initializes a new instance of the FormattedText class
Public method | FormattedText(String) | Initializes a new instance of the FormattedText class
Public method | FormattedText(FormattedText) | Initializes a new instance of the FormattedText class
Top
Methods
 | Name | Description
Public method | ApplySource | Applies a new source text.
Public method | Clear | Clears the text.
Public method | Clone | Creates a deep copy of the FormattedText and returns it.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, ColorRgba) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Vector2, Vector2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
 | FormatColor | Returns a format string for changing the current text color to the specified one.
Public method | RenderToBitmap | Renders a text to the specified target Image.
Public method | UpdateVertexCache | Updates the cache that is used when emitting vertices. However, this is normally done automatically.
Top
Fields
Name | Description
FormatAlignCenter | Format string for changing the current text alignment to "Center".
FormatAlignLeft | Format string for changing the current text alignment to "Left".
FormatAlignRight | Format string for changing the current text alignment to "Right".
FormatColorTag | Format string for changing the current text color.
FormatElement | Format string for beginning a new text element.
FormatFont | Format string for changing the current Font.
FormatIcon | Format string for inserting an icon.
FormatNewline | Format string for inserting a line break.
FormatSlash | Format string for displaying a slash (/) character.
Top
Properties
 | Name | Description
Public property | DisplayedText | [GET] The text that is actually displayed.
Public property | Elements | [GET] The formatted text elements that have been generated analyzing the incoming source text.
Public property | FlowAreas | [GET / SET] A set of flow areas to be considered in word wrap. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | Fonts | [GET / SET] A set of Fonts that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | Icons | [GET / SET] A set of icons that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | IsEmpty | [GET] Returns whether the text is empty.
Public property | LineAlign | [GET / SET] Specifies the default horizontal alignment of each line, unless changed by format tags.
Public property | LineCount | [GET] The number of lines in the formatted text block.
Public property | MaxHeight | [GET / SET] The maximum height of the displayed text block. Zero deactivates maximum height.
Public property | MaxWidth | [GET / SET] The maximum width of the displayed text block. Zero deactivates maximum width.
Public property | Size | [GET] The text blocks boundary size.
Public property | SourceText | [GET / SET] The source text that is used, containing all format strings as well as the displayed text.
Public property | TextMetrics | [GET] The text blocks metrics.
Public property | WordWrap | [GET / SET] The word wrapping behaviour to use.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText Constructor

FormattedText Constructor
Overload List
 | Name | Description
Public method | FormattedText | Initializes a new instance of the FormattedText class
Public method | FormattedText(String) | Initializes a new instance of the FormattedText class
Public method | FormattedText(FormattedText) | Initializes a new instance of the FormattedText class
Top
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText Constructor

FormattedText Constructor
Initializes a new instance of the FormattedText class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedText()
See Also

Reference

FormattedText Class
FormattedText Overload
Duality.Drawing Namespace


FormattedText Constructor (String)

FormattedText Constructor (String)
Initializes a new instance of the FormattedText class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedText(
    string text
)

Parameters

text
Type: SystemString
See Also

Reference

FormattedText Class
FormattedText Overload
Duality.Drawing Namespace


FormattedText Constructor (FormattedText)

FormattedText Constructor (FormattedText)
Initializes a new instance of the FormattedText class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedText(
    FormattedText other
)

Parameters

other
Type: Duality.DrawingFormattedText
See Also

Reference

FormattedText Class
FormattedText Overload
Duality.Drawing Namespace


FormattedText Fields

FormattedText Fields

The FormattedText type exposes the following members.

Fields
Name | Description
FormatAlignCenter | Format string for changing the current text alignment to "Center".
FormatAlignLeft | Format string for changing the current text alignment to "Left".
FormatAlignRight | Format string for changing the current text alignment to "Right".
FormatColorTag | Format string for changing the current text color.
FormatElement | Format string for beginning a new text element.
FormatFont | Format string for changing the current Font.
FormatIcon | Format string for inserting an icon.
FormatNewline | Format string for inserting a line break.
FormatSlash | Format string for displaying a slash (/) character.
Top
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatAlignCenter Field

FormattedTextFormatAlignCenter Field
Format string for changing the current text alignment to "Center".

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatAlignCenter

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatAlignLeft Field

FormattedTextFormatAlignLeft Field
Format string for changing the current text alignment to "Left".

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatAlignLeft

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatAlignRight Field

FormattedTextFormatAlignRight Field
Format string for changing the current text alignment to "Right".

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatAlignRight

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatColorTag Field

FormattedTextFormatColorTag Field
Format string for changing the current text color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatColorTag

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatElement Field

FormattedTextFormatElement Field
Format string for beginning a new text element.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatElement

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatFont Field

FormattedTextFormatFont Field
Format string for changing the current Font.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatFont

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatIcon Field

FormattedTextFormatIcon Field
Format string for inserting an icon.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatIcon

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatNewline Field

FormattedTextFormatNewline Field
Format string for inserting a line break.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatNewline

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FormatSlash Field

FormattedTextFormatSlash Field
Format string for displaying a slash (/) character.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatSlash

Field Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText Methods

FormattedText Methods

The FormattedText type exposes the following members.

Methods
 | Name | Description
Public method | ApplySource | Applies a new source text.
Public method | Clear | Clears the text.
Public method | Clone | Creates a deep copy of the FormattedText and returns it.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, ColorRgba) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Vector2, Vector2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
 | FormatColor | Returns a format string for changing the current text color to the specified one.
Public method | RenderToBitmap | Renders a text to the specified target Image.
Public method | UpdateVertexCache | Updates the cache that is used when emitting vertices. However, this is normally done automatically.
Top
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.ApplySource Method

FormattedTextApplySource Method
Applies a new source text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplySource(
    string text = null
)

Parameters

text (Optional)
Type: SystemString
The new source text to apply. If null, the current source text is re-applied.
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Clear Method

FormattedTextClear Method
Clears the text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Clone Method

FormattedTextClone Method
Creates a deep copy of the FormattedText and returns it.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedText Clone()

Return Value

Type: FormattedText
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.EmitVertices Method

FormattedTextEmitVertices Method
Overload List
 | Name | Description
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, ColorRgba) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Vector2, Vector2) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Public method | EmitVertices(VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.
Top
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.EmitVertices Method (VertexC1P3T2[][], VertexC1P3T2[])

FormattedTextEmitVertices Method (VertexC1P3T2, VertexC1P3T2)
Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] EmitVertices(
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcons
)

Parameters

vertText
Type: Duality.DrawingVertexC1P3T2
One set of vertices for each Font that is available to this FormattedText.
vertIcons
Type: Duality.DrawingVertexC1P3T2
A set of icon vertices.

Return Value

Type: Int32
Returns an array of vertex counts for each emitted vertex array. Index 0 represents the number of emitted icon vertices, Index n represents the number of vertices emitted using Font n - 1.
See Also

Reference

FormattedText Class
EmitVertices Overload
Duality.Drawing Namespace


FormattedText.EmitVertices Method (VertexC1P3T2[][], VertexC1P3T2[], Single, Single, ColorRgba)

FormattedTextEmitVertices Method (VertexC1P3T2, VertexC1P3T2, Single, Single, ColorRgba)
Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] EmitVertices(
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcons,
    float x,
    float y,
    ColorRgba clr
)

Parameters

vertText
Type: Duality.DrawingVertexC1P3T2
One set of vertices for each Font that is available to this ForattedText.
vertIcons
Type: Duality.DrawingVertexC1P3T2
A set of icon vertices.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
clr
Type: Duality.DrawingColorRgba
The color value that is applied to each emitted vertex.

Return Value

Type: Int32
Returns an array of vertex counts for each emitted vertex array. Index 0 represents the number of emitted icon vertices, Index n represents the number of vertices emitted using Font n - 1.
See Also

Reference

FormattedText Class
EmitVertices Overload
Duality.Drawing Namespace


FormattedText.EmitVertices Method (VertexC1P3T2[][], VertexC1P3T2[], Single, Single, Single)

FormattedTextEmitVertices Method (VertexC1P3T2, VertexC1P3T2, Single, Single, Single)
Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] EmitVertices(
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcons,
    float x,
    float y,
    float z = 0f
)

Parameters

vertText
Type: Duality.DrawingVertexC1P3T2
One set of vertices for each Font that is available to this ForattedText.
vertIcons
Type: Duality.DrawingVertexC1P3T2
A set of icon vertices.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
z (Optional)
Type: SystemSingle
An Z-Offset applied to the position of each emitted vertex.

Return Value

Type: Int32
Returns an array of vertex counts for each emitted vertex array. Index 0 represents the number of emitted icon vertices, Index n represents the number of vertices emitted using Font n - 1.
See Also

Reference

FormattedText Class
EmitVertices Overload
Duality.Drawing Namespace


FormattedText.EmitVertices Method (VertexC1P3T2[][], VertexC1P3T2[], Single, Single, Single, ColorRgba, Vector2, Vector2)

FormattedTextEmitVertices Method (VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Vector2, Vector2)
Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] EmitVertices(
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcons,
    float x,
    float y,
    float z,
    ColorRgba clr,
    Vector2 xDot,
    Vector2 yDot
)

Parameters

vertText
Type: Duality.DrawingVertexC1P3T2
One set of vertices for each Font that is available to this ForattedText.
vertIcons
Type: Duality.DrawingVertexC1P3T2
A set of icon vertices.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
z
Type: SystemSingle
An Z-Offset applied to the position of each emitted vertex.
clr
Type: Duality.DrawingColorRgba
The color value that is applied to each emitted vertex.
xDot
Type: DualityVector2
Dot product base for the transformed vertices.
yDot
Type: DualityVector2
Dot product base for the transformed vertices.

Return Value

Type: Int32
Returns an array of vertex counts for each emitted vertex array. Index 0 represents the number of emitted icon vertices, Index n represents the number of vertices emitted using Font n - 1.
See Also

Reference

FormattedText Class
EmitVertices Overload
Duality.Drawing Namespace


FormattedText.EmitVertices Method (VertexC1P3T2[][], VertexC1P3T2[], Single, Single, Single, ColorRgba, Single, Single)

FormattedTextEmitVertices Method (VertexC1P3T2, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single)
Emits sets of vertices for glyphs and icons based on this formatted text. To render it, use each set of vertices combined with the corresponding Fonts Material.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] EmitVertices(
    ref VertexC1P3T2[][] vertText,
    ref VertexC1P3T2[] vertIcons,
    float x,
    float y,
    float z,
    ColorRgba clr,
    float angle = 0f,
    float scale = 1f
)

Parameters

vertText
Type: Duality.DrawingVertexC1P3T2
One set of vertices for each Font that is available to this ForattedText.
vertIcons
Type: Duality.DrawingVertexC1P3T2
A set of icon vertices.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
z
Type: SystemSingle
An Z-Offset applied to the position of each emitted vertex.
clr
Type: Duality.DrawingColorRgba
The color value that is applied to each emitted vertex.
angle (Optional)
Type: SystemSingle
An angle by which the text is rotated (before applying the offset).
scale (Optional)
Type: SystemSingle
A factor by which the text is scaled (before applying the offset).

Return Value

Type: Int32
Returns an array of vertex counts for each emitted vertex array. Index 0 represents the number of emitted icon vertices, Index n represents the number of vertices emitted using Font n - 1.
See Also

Reference

FormattedText Class
EmitVertices Overload
Duality.Drawing Namespace


FormattedText.FormatColor Method

FormattedTextFormatColor Method
Returns a format string for changing the current text color to the specified one.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string FormatColor(
    ColorRgba color
)

Parameters

color
Type: Duality.DrawingColorRgba

Return Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.RenderToBitmap Method

FormattedTextRenderToBitmap Method
Renders a text to the specified target Image.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RenderToBitmap(
    string text,
    PixelData target,
    float x = 0f,
    float y = 0f,
    PixelData icons = null
)

Parameters

text
Type: SystemString
target
Type: Duality.DrawingPixelData
x (Optional)
Type: SystemSingle
y (Optional)
Type: SystemSingle
icons (Optional)
Type: Duality.DrawingPixelData
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.UpdateVertexCache Method

FormattedTextUpdateVertexCache Method
Updates the cache that is used when emitting vertices. However, this is normally done automatically.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UpdateVertexCache()
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText Properties

FormattedText Properties

The FormattedText type exposes the following members.

Properties
 | Name | Description
Public property | DisplayedText | [GET] The text that is actually displayed.
Public property | Elements | [GET] The formatted text elements that have been generated analyzing the incoming source text.
Public property | FlowAreas | [GET / SET] A set of flow areas to be considered in word wrap. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | Fonts | [GET / SET] A set of Fonts that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | Icons | [GET / SET] A set of icons that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.
Public property | IsEmpty | [GET] Returns whether the text is empty.
Public property | LineAlign | [GET / SET] Specifies the default horizontal alignment of each line, unless changed by format tags.
Public property | LineCount | [GET] The number of lines in the formatted text block.
Public property | MaxHeight | [GET / SET] The maximum height of the displayed text block. Zero deactivates maximum height.
Public property | MaxWidth | [GET / SET] The maximum width of the displayed text block. Zero deactivates maximum width.
Public property | Size | [GET] The text blocks boundary size.
Public property | SourceText | [GET / SET] The source text that is used, containing all format strings as well as the displayed text.
Public property | TextMetrics | [GET] The text blocks metrics.
Public property | WordWrap | [GET / SET] The word wrapping behaviour to use.
Top
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.DisplayedText Property

FormattedTextDisplayedText Property
[GET] The text that is actually displayed.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string DisplayedText { get; }

Property Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Elements Property

FormattedTextElements Property
[GET] The formatted text elements that have been generated analyzing the incoming source text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextElement[] Elements { get; }

Property Value

Type: FormattedTextElement
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.FlowAreas Property

FormattedTextFlowAreas Property
[GET / SET] A set of flow areas to be considered in word wrap. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextFlowArea[] FlowAreas { get; set; }

Property Value

Type: FormattedTextFlowArea
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Fonts Property

FormattedTextFonts Property
[GET / SET] A set of Fonts that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Font>[] Fonts { get; set; }

Property Value

Type: ContentRef Font
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Icons Property

FormattedTextIcons Property
[GET / SET] A set of icons that is available in the text. If you modify this value without re-assigning it, be sure to call UpdateVertexCache.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextIcon[] Icons { get; set; }

Property Value

Type: FormattedTextIcon
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.IsEmpty Property

FormattedTextIsEmpty Property
[GET] Returns whether the text is empty.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsEmpty { get; }

Property Value

Type: Boolean
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.LineAlign Property

FormattedTextLineAlign Property
[GET / SET] Specifies the default horizontal alignment of each line, unless changed by format tags.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Alignment LineAlign { get; set; }

Property Value

Type: Alignment
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.LineCount Property

FormattedTextLineCount Property
[GET] The number of lines in the formatted text block.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int LineCount { get; }

Property Value

Type: Int32
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.MaxHeight Property

FormattedTextMaxHeight Property
[GET / SET] The maximum height of the displayed text block. Zero deactivates maximum height.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MaxHeight { get; set; }

Property Value

Type: Int32
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.MaxWidth Property

FormattedTextMaxWidth Property
[GET / SET] The maximum width of the displayed text block. Zero deactivates maximum width.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MaxWidth { get; set; }

Property Value

Type: Int32
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.Size Property

FormattedTextSize Property
[GET] The text blocks boundary size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Size { get; }

Property Value

Type: Vector2
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.SourceText Property

FormattedTextSourceText Property
[GET / SET] The source text that is used, containing all format strings as well as the displayed text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string SourceText { get; set; }

Property Value

Type: String
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.TextMetrics Property

FormattedTextTextMetrics Property
[GET] The text blocks metrics.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextMetrics TextMetrics { get; }

Property Value

Type: FormattedTextMetrics
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.WordWrap Property

FormattedTextWordWrap Property
[GET / SET] The word wrapping behaviour to use.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FormattedTextWrapMode WordWrap { get; set; }

Property Value

Type: FormattedTextWrapMode
See Also

Reference

FormattedText Class
Duality.Drawing Namespace


FormattedText.AlignChangeElement Class

FormattedTextAlignChangeElement Class
Changes the current lines' alignment. May be Left, Right or Center.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextAlignChangeElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AlignChangeElement : FormattedTextElement

The FormattedTextAlignChangeElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextAlignChangeElement | Initializes a new instance of the FormattedTextAlignChangeElement class
Top
Properties
 | Name | Description
Public property | Align | [GET] The alignment to use for the current line.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.AlignChangeElement Constructor

FormattedTextAlignChangeElement Constructor
Initializes a new instance of the FormattedTextAlignChangeElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AlignChangeElement(
    Alignment align
)

Parameters

align
Type: DualityAlignment
See Also

Reference

FormattedTextAlignChangeElement Class
Duality.Drawing Namespace


AlignChangeElement Properties

AlignChangeElement Properties

The FormattedTextAlignChangeElement type exposes the following members.

Properties
 | Name | Description
Public property | Align | [GET] The alignment to use for the current line.
Top
See Also

Reference

FormattedTextAlignChangeElement Class
Duality.Drawing Namespace


FormattedText.AlignChangeElement.Align Property

FormattedTextAlignChangeElementAlign Property
[GET] The alignment to use for the current line.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Alignment Align { get; }

Property Value

Type: Alignment
See Also

Reference

FormattedTextAlignChangeElement Class
Duality.Drawing Namespace


FormattedText.ColorChangeElement Class

FormattedTextColorChangeElement Class
Changes the currently used ColorRgba.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextColorChangeElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ColorChangeElement : FormattedTextElement

The FormattedTextColorChangeElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextColorChangeElement | Initializes a new instance of the FormattedTextColorChangeElement class
Top
Properties
 | Name | Description
Public property | Color | [GET] The new color to use.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.ColorChangeElement Constructor

FormattedTextColorChangeElement Constructor
Initializes a new instance of the FormattedTextColorChangeElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorChangeElement(
    ColorRgba color
)

Parameters

color
Type: Duality.DrawingColorRgba
See Also

Reference

FormattedTextColorChangeElement Class
Duality.Drawing Namespace


ColorChangeElement Properties

ColorChangeElement Properties

The FormattedTextColorChangeElement type exposes the following members.

Properties
 | Name | Description
Public property | Color | [GET] The new color to use.
Top
See Also

Reference

FormattedTextColorChangeElement Class
Duality.Drawing Namespace


FormattedText.ColorChangeElement.Color Property

FormattedTextColorChangeElementColor Property
[GET] The new color to use.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba Color { get; }

Property Value

Type: ColorRgba
See Also

Reference

FormattedTextColorChangeElement Class
Duality.Drawing Namespace


FormattedText.Element Class

FormattedTextElement Class
Represents an element of a formatted text.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
More...

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class Element

The FormattedTextElement type exposes the following members.

Constructors
 | Name | Description
Protected method | FormattedTextElement | Initializes a new instance of the FormattedTextElement class
Top
See Also

Reference

Duality.Drawing Namespace
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextAlignChangeElement
Duality.DrawingFormattedTextColorChangeElement
Duality.DrawingFormattedTextFontChangeElement
Duality.DrawingFormattedTextIconElement
Duality.DrawingFormattedTextNewLineElement
Duality.DrawingFormattedTextTextElement


FormattedText.Element Constructor

FormattedTextElement Constructor
Initializes a new instance of the FormattedTextElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Element()
See Also

Reference

FormattedTextElement Class
Duality.Drawing Namespace


FormattedText.FlowArea Structure

FormattedTextFlowArea Structure
An rectangular area that will be avoided by the text flow.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct FlowArea

The FormattedTextFlowArea type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextFlowArea | Initializes a new instance of the FormattedTextFlowArea class
Top
Fields
 | Name | Description
Public field | alignRight | Whether the area is located at the right edge of the text area, instead of the left edge.
Public field | height | The areas height.
Public field | width | The areas width.
Public field | y | The areas y-Coordinate.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.FlowArea Constructor

FormattedTextFlowArea Constructor
Initializes a new instance of the FormattedTextFlowArea class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FlowArea(
    int y,
    int height,
    int width,
    bool alignRight
)

Parameters

y
Type: SystemInt32
height
Type: SystemInt32
width
Type: SystemInt32
alignRight
Type: SystemBoolean
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FlowArea Fields

FlowArea Fields

The FormattedTextFlowArea type exposes the following members.

Fields
 | Name | Description
Public field | alignRight | Whether the area is located at the right edge of the text area, instead of the left edge.
Public field | height | The areas height.
Public field | width | The areas width.
Public field | y | The areas y-Coordinate.
Top
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FormattedText.FlowArea.alignRight Field

FormattedTextFlowAreaalignRight Field
Whether the area is located at the right edge of the text area, instead of the left edge.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool alignRight

Field Value

Type: Boolean
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FormattedText.FlowArea.height Field

FormattedTextFlowAreaheight Field
The areas height.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int height

Field Value

Type: Int32
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FormattedText.FlowArea.width Field

FormattedTextFlowAreawidth Field
The areas width.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int width

Field Value

Type: Int32
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FormattedText.FlowArea.y Field

FormattedTextFlowAreay Field
The areas y-Coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int y

Field Value

Type: Int32
See Also

Reference

FormattedTextFlowArea Structure
Duality.Drawing Namespace


FormattedText.FontChangeElement Class

FormattedTextFontChangeElement Class
Changes the currently used Font.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextFontChangeElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class FontChangeElement : FormattedTextElement

The FormattedTextFontChangeElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextFontChangeElement | Initializes a new instance of the FormattedTextFontChangeElement class
Top
Properties
 | Name | Description
Public property | FontIndex | [GET] The index of the Font to switch to.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.FontChangeElement Constructor

FormattedTextFontChangeElement Constructor
Initializes a new instance of the FormattedTextFontChangeElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontChangeElement(
    int font
)

Parameters

font
Type: SystemInt32
See Also

Reference

FormattedTextFontChangeElement Class
Duality.Drawing Namespace


FontChangeElement Properties

FontChangeElement Properties

The FormattedTextFontChangeElement type exposes the following members.

Properties
 | Name | Description
Public property | FontIndex | [GET] The index of the Font to switch to.
Top
See Also

Reference

FormattedTextFontChangeElement Class
Duality.Drawing Namespace


FormattedText.FontChangeElement.FontIndex Property

FormattedTextFontChangeElementFontIndex Property
[GET] The index of the Font to switch to.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int FontIndex { get; }

Property Value

Type: Int32
See Also

Reference

FormattedTextFontChangeElement Class
Duality.Drawing Namespace


FormattedText.Icon Structure

FormattedTextIcon Structure
An icon that can be displayed inside the formatted text.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct Icon

The FormattedTextIcon type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextIcon | Initializes a new instance of the FormattedTextIcon class
Top
Fields
 | Name | Description
Public field | offset | An optional pixel offset that is applied to the icon when drawing it
Public field | size | The icons display size.
Public field | uvRect | The icons UV-Coordinates on the icon texture that will be used for rendering icons.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.Icon Constructor

FormattedTextIcon Constructor
Initializes a new instance of the FormattedTextIcon class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Icon(
    Rect uvRect,
    Vector2 size,
    Vector2 offset
)

Parameters

uvRect
Type: DualityRect
size
Type: DualityVector2
offset
Type: DualityVector2
See Also

Reference

FormattedTextIcon Structure
Duality.Drawing Namespace


Icon Fields

Icon Fields

The FormattedTextIcon type exposes the following members.

Fields
 | Name | Description
Public field | offset | An optional pixel offset that is applied to the icon when drawing it
Public field | size | The icons display size.
Public field | uvRect | The icons UV-Coordinates on the icon texture that will be used for rendering icons.
Top
See Also

Reference

FormattedTextIcon Structure
Duality.Drawing Namespace


FormattedText.Icon.offset Field

FormattedTextIconoffset Field
An optional pixel offset that is applied to the icon when drawing it

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 offset

Field Value

Type: Vector2
See Also

Reference

FormattedTextIcon Structure
Duality.Drawing Namespace


FormattedText.Icon.size Field

FormattedTextIconsize Field
The icons display size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 size

Field Value

Type: Vector2
See Also

Reference

FormattedTextIcon Structure
Duality.Drawing Namespace


FormattedText.Icon.uvRect Field

FormattedTextIconuvRect Field
The icons UV-Coordinates on the icon texture that will be used for rendering icons.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect uvRect

Field Value

Type: Rect
See Also

Reference

FormattedTextIcon Structure
Duality.Drawing Namespace


FormattedText.IconElement Class

FormattedTextIconElement Class
Contains an icon.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextIconElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class IconElement : FormattedTextElement

The FormattedTextIconElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextIconElement | Initializes a new instance of the FormattedTextIconElement class
Top
Properties
 | Name | Description
Public property | IconIndex | [GET] The index of the icon to display at this elements position.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.IconElement Constructor

FormattedTextIconElement Constructor
Initializes a new instance of the FormattedTextIconElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IconElement(
    int icon
)

Parameters

icon
Type: SystemInt32
See Also

Reference

FormattedTextIconElement Class
Duality.Drawing Namespace


IconElement Properties

IconElement Properties

The FormattedTextIconElement type exposes the following members.

Properties
 | Name | Description
Public property | IconIndex | [GET] The index of the icon to display at this elements position.
Top
See Also

Reference

FormattedTextIconElement Class
Duality.Drawing Namespace


FormattedText.IconElement.IconIndex Property

FormattedTextIconElementIconIndex Property
[GET] The index of the icon to display at this elements position.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int IconIndex { get; }

Property Value

Type: Int32
See Also

Reference

FormattedTextIconElement Class
Duality.Drawing Namespace


FormattedText.Metrics Class

FormattedTextMetrics Class
Provides information about a formatted texts metrics.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextMetrics

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Metrics

The FormattedTextMetrics type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextMetrics | Initializes a new instance of the FormattedTextMetrics class
Top
Properties
 | Name | Description
Public property | ElementBounds | [GET] Each formatted text elements individual boundary.
Public property | LineBounds | [GET] Each lines boundary.
Public property | LineCount | [GET] The number of lines.
Public property | Size | [GET] The size of the formatted text block as whole.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.Metrics Constructor

FormattedTextMetrics Constructor
Initializes a new instance of the FormattedTextMetrics class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Metrics(
    Vector2 size,
    List<Rect> lineBounds,
    List<Rect> elementBounds
)

Parameters

size
Type: DualityVector2
lineBounds
Type: System.Collections.GenericList Rect
elementBounds
Type: System.Collections.GenericList Rect
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


Metrics Properties

Metrics Properties

The FormattedTextMetrics type exposes the following members.

Properties
 | Name | Description
Public property | ElementBounds | [GET] Each formatted text elements individual boundary.
Public property | LineBounds | [GET] Each lines boundary.
Public property | LineCount | [GET] The number of lines.
Public property | Size | [GET] The size of the formatted text block as whole.
Top
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


FormattedText.Metrics.ElementBounds Property

FormattedTextMetricsElementBounds Property
[GET] Each formatted text elements individual boundary.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IReadOnlyList ElementBounds { get; }

Property Value

Type: IReadOnlyListT
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


FormattedText.Metrics.LineBounds Property

FormattedTextMetricsLineBounds Property
[GET] Each lines boundary.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IReadOnlyList LineBounds { get; }

Property Value

Type: IReadOnlyListT
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


FormattedText.Metrics.LineCount Property

FormattedTextMetricsLineCount Property
[GET] The number of lines.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int LineCount { get; }

Property Value

Type: Int32
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


FormattedText.Metrics.Size Property

FormattedTextMetricsSize Property
[GET] The size of the formatted text block as whole.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Size { get; }

Property Value

Type: Vector2
See Also

Reference

FormattedTextMetrics Class
Duality.Drawing Namespace


FormattedText.NewLineElement Class

FormattedTextNewLineElement Class
Forces a line break at this position.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextNewLineElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class NewLineElement : FormattedTextElement

The FormattedTextNewLineElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextNewLineElement | Initializes a new instance of the FormattedTextNewLineElement class
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.NewLineElement Constructor

FormattedTextNewLineElement Constructor
Initializes a new instance of the FormattedTextNewLineElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public NewLineElement()
See Also

Reference

FormattedTextNewLineElement Class
Duality.Drawing Namespace


FormattedText.TextElement Class

FormattedTextTextElement Class
Contains a text string.
Inheritance Hierarchy
SystemObject
Duality.DrawingFormattedTextElement
Duality.DrawingFormattedTextTextElement

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TextElement : FormattedTextElement

The FormattedTextTextElement type exposes the following members.

Constructors
 | Name | Description
Public method | FormattedTextTextElement | Initializes a new instance of the FormattedTextTextElement class
Top
Properties
 | Name | Description
Public property | Text | [GET] text string this element contains.
Top
See Also

Reference

Duality.Drawing Namespace


FormattedText.TextElement Constructor

FormattedTextTextElement Constructor
Initializes a new instance of the FormattedTextTextElement class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextElement(
    string text
)

Parameters

text
Type: SystemString
See Also

Reference

FormattedTextTextElement Class
Duality.Drawing Namespace


TextElement Properties

TextElement Properties

The FormattedTextTextElement type exposes the following members.

Properties
 | Name | Description
Public property | Text | [GET] text string this element contains.
Top
See Also

Reference

FormattedTextTextElement Class
Duality.Drawing Namespace


FormattedText.TextElement.Text Property

FormattedTextTextElementText Property
[GET] text string this element contains.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Text { get; }

Property Value

Type: String
See Also

Reference

FormattedTextTextElement Class
Duality.Drawing Namespace


FormattedText.WrapMode Enumeration

FormattedTextWrapMode Enumeration
Describes word wrap behaviour.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum WrapMode
Members
Member name | Value | Description
Glyph | 0 | Word wrap is allowed at each glyph.
Word | 1 | Word wrap is allowed after / before each word, but not in the middle of one.
Element | 2 | Word wrap is only allowed between two separate formatted text elements.
See Also

Reference

Duality.Drawing Namespace


IColorData Interface

IColorData Interface
A general interface for different types of color data.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
public interface IColorData

The IColorData type exposes the following members.

Methods
 | Name | Description
Public method | SetIntArgb | Sets the color base ond a UInt32-Argb value.
Public method | SetIntRgba | Sets the color base ond a UInt32-Rgba value.
Public method | ToIntArgb | Converts the color to a UInt32-Argb value.
Public method | ToIntRgba | Converts the color to a UInt32-Rgba value.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
See Also

Reference

Duality.Drawing Namespace


IColorData Methods

IColorData Methods

The IColorData type exposes the following members.

Methods
 | Name | Description
Public method | SetIntArgb | Sets the color base ond a UInt32-Argb value.
Public method | SetIntRgba | Sets the color base ond a UInt32-Rgba value.
Public method | ToIntArgb | Converts the color to a UInt32-Argb value.
Public method | ToIntRgba | Converts the color to a UInt32-Rgba value.
Top
Extension Methods
 | Name | Description
Public Extension Method | ConvertTo(Type) | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Public Extension Method | ConvertToT | Overloaded. Converts the color to a different color data format. If there is also a specific method doing the desired conversion, use that instead - it might be faster. (Defined by ExtMethodsIColorData.)
Top
See Also

Reference

IColorData Interface
Duality.Drawing Namespace


IColorData.SetIntArgb Method

IColorDataSetIntArgb Method
Sets the color base ond a UInt32-Argb value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
void SetIntArgb(
    int argb
)

Parameters

argb
Type: SystemInt32
See Also

Reference

IColorData Interface
Duality.Drawing Namespace


IColorData.SetIntRgba Method

IColorDataSetIntRgba Method
Sets the color base ond a UInt32-Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
void SetIntRgba(
    int rgba
)

Parameters

rgba
Type: SystemInt32
See Also

Reference

IColorData Interface
Duality.Drawing Namespace


IColorData.ToIntArgb Method

IColorDataToIntArgb Method
Converts the color to a UInt32-Argb value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
int ToIntArgb()

Return Value

Type: Int32
See Also

Reference

IColorData Interface
Duality.Drawing Namespace


IColorData.ToIntRgba Method

IColorDataToIntRgba Method
Converts the color to a UInt32-Rgba value.

Namespace: Duality.Drawing
Assembly: DualityPrimitives (in DualityPrimitives.dll) Version: 2.0.1.0
Syntax
C#
Copy
int ToIntRgba()

Return Value

Type: Int32
See Also

Reference

IColorData Interface
Duality.Drawing Namespace


IDrawBatch Interface

IDrawBatch Interface

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IDrawBatch

The IDrawBatch type exposes the following members.

Methods
 | Name | Description
Public method | Append |
Public method | AppendJIT |
Public method | CanAppend |
Public method | CanAppendJITT |
Public method | SameVertexType |
Public method | UploadVertices |
Top
Properties
 | Name | Description
Public property | Material |
Public property | SortIndex |
Public property | VertexCount |
Public property | VertexDeclaration |
Public property | VertexMode |
Public property | ZSortIndex |
Top
See Also

Reference

Duality.Drawing Namespace


IDrawBatch Methods

IDrawBatch Methods

The IDrawBatch type exposes the following members.

Methods
 | Name | Description
Public method | Append |
Public method | AppendJIT |
Public method | CanAppend |
Public method | CanAppendJITT |
Public method | SameVertexType |
Public method | UploadVertices |
Top
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.Append Method

IDrawBatchAppend Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Append(
    IDrawBatch other
)

Parameters

other
Type: Duality.DrawingIDrawBatch
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.AppendJIT Method

IDrawBatchAppendJIT Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AppendJIT(
    Object vertexData,
    int length
)

Parameters

vertexData
Type: SystemObject
length
Type: SystemInt32
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.CanAppend Method

IDrawBatchCanAppend Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool CanAppend(
    IDrawBatch other
)

Parameters

other
Type: Duality.DrawingIDrawBatch

Return Value

Type: Boolean
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.CanAppendJIT(T) Method

IDrawBatchCanAppendJITT Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool CanAppendJIT<T>(
    float invZSortAccuracy,
    float zSortIndex,
    BatchInfo material,
    VertexMode vertexMode
)
where T : struct, new(), IVertexData

Parameters

invZSortAccuracy
Type: SystemSingle
zSortIndex
Type: SystemSingle
material
Type: Duality.DrawingBatchInfo
vertexMode
Type: Duality.DrawingVertexMode

Type Parameters

T

Return Value

Type: Boolean
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.SameVertexType Method

IDrawBatchSameVertexType Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool SameVertexType(
    IDrawBatch other
)

Parameters

other
Type: Duality.DrawingIDrawBatch

Return Value

Type: Boolean
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.UploadVertices Method

IDrawBatchUploadVertices Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void UploadVertices(
    IVertexUploader target,
    List<IDrawBatch> uploadBatches
)

Parameters

target
Type: Duality.DrawingIVertexUploader
uploadBatches
Type: System.Collections.GenericList IDrawBatch
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch Properties

IDrawBatch Properties

The IDrawBatch type exposes the following members.

Properties
 | Name | Description
Public property | Material |
Public property | SortIndex |
Public property | VertexCount |
Public property | VertexDeclaration |
Public property | VertexMode |
Public property | ZSortIndex |
Top
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.Material Property

IDrawBatchMaterial Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
BatchInfo Material { get; }

Property Value

Type: BatchInfo
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.SortIndex Property

IDrawBatchSortIndex Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int SortIndex { get; }

Property Value

Type: Int32
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.VertexCount Property

IDrawBatchVertexCount Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int VertexCount { get; }

Property Value

Type: Int32
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.VertexDeclaration Property

IDrawBatchVertexDeclaration Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
VertexDeclaration VertexDeclaration { get; }

Property Value

Type: VertexDeclaration
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.VertexMode Property

IDrawBatchVertexMode Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
VertexMode VertexMode { get; }

Property Value

Type: VertexMode
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawBatch.ZSortIndex Property

IDrawBatchZSortIndex Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float ZSortIndex { get; }

Property Value

Type: Single
See Also

Reference

IDrawBatch Interface
Duality.Drawing Namespace


IDrawDevice Interface

IDrawDevice Interface
Defines a general interface for drawing devices. Its main duty is to accept and collect parameterized vertex data.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IDrawDevice

The IDrawDevice type exposes the following members.

Methods
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsCoordInView | Returns whether the specified world-space position is visible in the drawing devices view space.
Public method | PreprocessCoords | Processes the specified world space position and scale values and transforms them to the IDrawDevices view space. This usually also applies a perspective effect, if applicable.
Top
Properties
 | Name | Description
Public property | DepthWrite | [GET] Returns whether the drawing device allows writing to the depth buffer
Public property | FarZ | [GET] The highest Z value that can be displayed by the device.
Public property | FocusDist | [GET] Reference distance for calculating the perspective effect. An object this far away from the camera will appear in its original size.
Public property | IsPicking | [GET] Returns whether the drawing device is currently performing a visual picking opreation.
Public property | NearZ | [GET] The lowest Z value that can be displayed by the device.
Public property | Perspective | [GET] The perspective projection type that is currently active in this drawing device.
Public property | RefAngle | [GET] Reference angle for rendering i.e. the angle of the drawing device's virtual camera.
Public property | RefCoord | [GET] Reference coordinate for rendering i.e. the position of the drawing device's virtual camera.
Public property | TargetSize | [GET] The size of the surface this drawing device operates on.
Public property | VisibilityMask | [GET] A bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
See Also

Reference

Duality.Drawing Namespace


IDrawDevice Methods

IDrawDevice Methods

The IDrawDevice type exposes the following members.

Methods
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | GetScaleAtZ | Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Public method | IsCoordInView | Returns whether the specified world-space position is visible in the drawing devices view space.
Public method | PreprocessCoords | Processes the specified world space position and scale values and transforms them to the IDrawDevices view space. This usually also applies a perspective effect, if applicable.
Top
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.AddVertices Method

IDrawDeviceAddVertices Method
Overload List
 | Name | Description
Public method | AddVerticesT(BatchInfo, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(BatchInfo, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Public method | AddVerticesT(ContentRefMaterial, VertexMode, T, Int32) | Adds a parameterized set of vertices to the drawing devices rendering schedule.
Top
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.AddVertices(T) Method (BatchInfo, VertexMode, T[])

IDrawDeviceAddVerticesT Method (BatchInfo, VertexMode, T)
Adds a parameterized set of vertices to the drawing devices rendering schedule.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddVertices<T>(
    BatchInfo material,
    VertexMode vertexMode,
    params T[] vertices
)
where T : struct, new(), IVertexData

Parameters

material
Type: Duality.DrawingBatchInfo
The BatchInfo to use for rendering the vertices.
vertexMode
Type: Duality.DrawingVertexMode
The vertices drawing mode.
vertices
Type: T
The vertex data to add.

Type Parameters

T
The type of vertex data to add.
See Also

Reference

IDrawDevice Interface
AddVertices Overload
Duality.Drawing Namespace


IDrawDevice.AddVertices(T) Method (ContentRef(Material), VertexMode, T[])

IDrawDeviceAddVerticesT Method (ContentRefMaterial, VertexMode, T)
Adds a parameterized set of vertices to the drawing devices rendering schedule.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddVertices<T>(
    ContentRef<Material> material,
    VertexMode vertexMode,
    params T[] vertices
)
where T : struct, new(), IVertexData

Parameters

material
Type: DualityContentRef Material
The Material to use for rendering the vertices.
vertexMode
Type: Duality.DrawingVertexMode
The vertices drawing mode.
vertices
Type: T
The vertex data to add.

Type Parameters

T
The type of vertex data to add.
See Also

Reference

IDrawDevice Interface
AddVertices Overload
Duality.Drawing Namespace


IDrawDevice.AddVertices(T) Method (BatchInfo, VertexMode, T[], Int32)

IDrawDeviceAddVerticesT Method (BatchInfo, VertexMode, T, Int32)
Adds a parameterized set of vertices to the drawing devices rendering schedule.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddVertices<T>(
    BatchInfo material,
    VertexMode vertexMode,
    T[] vertexBuffer,
    int vertexCount
)
where T : struct, new(), IVertexData

Parameters

material
Type: Duality.DrawingBatchInfo
The BatchInfo to use for rendering the vertices.
vertexMode
Type: Duality.DrawingVertexMode
The vertices drawing mode.
vertexBuffer
Type: T
A vertex data buffer that stores the vertices to add.
vertexCount
Type: SystemInt32
The number of vertices to add, from the beginning of the buffer.

Type Parameters

T
The type of vertex data to add.
See Also

Reference

IDrawDevice Interface
AddVertices Overload
Duality.Drawing Namespace


IDrawDevice.AddVertices(T) Method (ContentRef(Material), VertexMode, T[], Int32)

IDrawDeviceAddVerticesT Method (ContentRefMaterial, VertexMode, T, Int32)
Adds a parameterized set of vertices to the drawing devices rendering schedule.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void AddVertices<T>(
    ContentRef<Material> material,
    VertexMode vertexMode,
    T[] vertexBuffer,
    int vertexCount
)
where T : struct, new(), IVertexData

Parameters

material
Type: DualityContentRef Material
The Material to use for rendering the vertices.
vertexMode
Type: Duality.DrawingVertexMode
The vertices drawing mode.
vertexBuffer
Type: T
A vertex data buffer that stores the vertices to add.
vertexCount
Type: SystemInt32
The number of vertices to add, from the beginning of the buffer.

Type Parameters

T
The type of vertex data to add.
See Also

Reference

IDrawDevice Interface
AddVertices Overload
Duality.Drawing Namespace


IDrawDevice.GetScaleAtZ Method

IDrawDeviceGetScaleAtZ Method
Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float GetScaleAtZ(
    float z
)

Parameters

z
Type: SystemSingle

Return Value

Type: Single
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.GetScreenCoord Method

IDrawDeviceGetScreenCoord Method
Overload List
 | Name | Description
Public method | GetScreenCoord(Vector2) | Transforms world space coordinates to screen space coordinates.
Public method | GetScreenCoord(Vector3) | Transforms world space coordinates to screen space coordinates.
Top
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.GetScreenCoord Method (Vector2)

IDrawDeviceGetScreenCoord Method (Vector2)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 GetScreenCoord(
    Vector2 spacePos
)

Parameters

spacePos
Type: DualityVector2

Return Value

Type: Vector3
See Also

Reference

IDrawDevice Interface
GetScreenCoord Overload
Duality.Drawing Namespace


IDrawDevice.GetScreenCoord Method (Vector3)

IDrawDeviceGetScreenCoord Method (Vector3)
Transforms world space coordinates to screen space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 GetScreenCoord(
    Vector3 spacePos
)

Parameters

spacePos
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

IDrawDevice Interface
GetScreenCoord Overload
Duality.Drawing Namespace


IDrawDevice.GetSpaceCoord Method

IDrawDeviceGetSpaceCoord Method
Overload List
 | Name | Description
Public method | GetSpaceCoord(Vector2) | Transforms screen space coordinates to world space coordinates.
Public method | GetSpaceCoord(Vector3) | Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
Top
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.GetSpaceCoord Method (Vector2)

IDrawDeviceGetSpaceCoord Method (Vector2)
Transforms screen space coordinates to world space coordinates.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 GetSpaceCoord(
    Vector2 screenPos
)

Parameters

screenPos
Type: DualityVector2

Return Value

Type: Vector3
See Also

Reference

IDrawDevice Interface
GetSpaceCoord Overload
Duality.Drawing Namespace


IDrawDevice.GetSpaceCoord Method (Vector3)

IDrawDeviceGetSpaceCoord Method (Vector3)
Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 GetSpaceCoord(
    Vector3 screenPos
)

Parameters

screenPos
Type: DualityVector3

Return Value

Type: Vector3
See Also

Reference

IDrawDevice Interface
GetSpaceCoord Overload
Duality.Drawing Namespace


IDrawDevice.IsCoordInView Method

IDrawDeviceIsCoordInView Method
Returns whether the specified world-space position is visible in the drawing devices view space.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsCoordInView(
    Vector3 c,
    float boundRad = 1f
)

Parameters

c
Type: DualityVector3
The position to test.
boundRad (Optional)
Type: SystemSingle
The visual bounding radius to assume for the specified position.

Return Value

Type: Boolean
True, if the position or a portion of its bounding circle is visible, false if not.
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.PreprocessCoords Method

IDrawDevicePreprocessCoords Method
Processes the specified world space position and scale values and transforms them to the IDrawDevices view space. This usually also applies a perspective effect, if applicable.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void PreprocessCoords(
    ref Vector3 pos,
    ref float scale
)

Parameters

pos
Type: DualityVector3
The position to process.
scale
Type: SystemSingle
The scale factor to process.
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice Properties

IDrawDevice Properties

The IDrawDevice type exposes the following members.

Properties
 | Name | Description
Public property | DepthWrite | [GET] Returns whether the drawing device allows writing to the depth buffer
Public property | FarZ | [GET] The highest Z value that can be displayed by the device.
Public property | FocusDist | [GET] Reference distance for calculating the perspective effect. An object this far away from the camera will appear in its original size.
Public property | IsPicking | [GET] Returns whether the drawing device is currently performing a visual picking opreation.
Public property | NearZ | [GET] The lowest Z value that can be displayed by the device.
Public property | Perspective | [GET] The perspective projection type that is currently active in this drawing device.
Public property | RefAngle | [GET] Reference angle for rendering i.e. the angle of the drawing device's virtual camera.
Public property | RefCoord | [GET] Reference coordinate for rendering i.e. the position of the drawing device's virtual camera.
Public property | TargetSize | [GET] The size of the surface this drawing device operates on.
Public property | VisibilityMask | [GET] A bitmask flagging all visibility groups that are considered visible to this drawing device.
Top
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.DepthWrite Property

IDrawDeviceDepthWrite Property
[GET] Returns whether the drawing device allows writing to the depth buffer

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool DepthWrite { get; }

Property Value

Type: Boolean
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.FarZ Property

IDrawDeviceFarZ Property
[GET] The highest Z value that can be displayed by the device.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float FarZ { get; }

Property Value

Type: Single
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.FocusDist Property

IDrawDeviceFocusDist Property
[GET] Reference distance for calculating the perspective effect. An object this far away from the camera will appear in its original size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float FocusDist { get; }

Property Value

Type: Single
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.IsPicking Property

IDrawDeviceIsPicking Property
[GET] Returns whether the drawing device is currently performing a visual picking opreation.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsPicking { get; }

Property Value

Type: Boolean
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.NearZ Property

IDrawDeviceNearZ Property
[GET] The lowest Z value that can be displayed by the device.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float NearZ { get; }

Property Value

Type: Single
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.Perspective Property

IDrawDevicePerspective Property
[GET] The perspective projection type that is currently active in this drawing device.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
PerspectiveMode Perspective { get; }

Property Value

Type: PerspectiveMode
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.RefAngle Property

IDrawDeviceRefAngle Property
[GET] Reference angle for rendering i.e. the angle of the drawing device's virtual camera.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float RefAngle { get; }

Property Value

Type: Single
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.RefCoord Property

IDrawDeviceRefCoord Property
[GET] Reference coordinate for rendering i.e. the position of the drawing device's virtual camera.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 RefCoord { get; }

Property Value

Type: Vector3
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.TargetSize Property

IDrawDeviceTargetSize Property
[GET] The size of the surface this drawing device operates on.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector2 TargetSize { get; }

Property Value

Type: Vector2
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IDrawDevice.VisibilityMask Property

IDrawDeviceVisibilityMask Property
[GET] A bitmask flagging all visibility groups that are considered visible to this drawing device.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
VisibilityFlag VisibilityMask { get; }

Property Value

Type: VisibilityFlag
See Also

Reference

IDrawDevice Interface
Duality.Drawing Namespace


IImageCodec Interface

IImageCodec Interface

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IImageCodec

The IImageCodec type exposes the following members.

Methods
 | Name | Description
Public method | CanReadFormat |
Public method | CanWriteFormat |
Public method | Read |
Public method | Write |
Top
Properties
 | Name | Description
Public property | CodecId |
Public property | Priority |
Top
See Also

Reference

Duality.Drawing Namespace


IImageCodec Methods

IImageCodec Methods

The IImageCodec type exposes the following members.

Methods
 | Name | Description
Public method | CanReadFormat |
Public method | CanWriteFormat |
Public method | Read |
Public method | Write |
Top
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.CanReadFormat Method

IImageCodecCanReadFormat Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool CanReadFormat(
    string formatId
)

Parameters

formatId
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.CanWriteFormat Method

IImageCodecCanWriteFormat Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool CanWriteFormat(
    string formatId
)

Parameters

formatId
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.Read Method

IImageCodecRead Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
PixelData Read(
    Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: PixelData
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.Write Method

IImageCodecWrite Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Write(
    Stream stream,
    PixelData data,
    string formatId
)

Parameters

stream
Type: System.IOStream
data
Type: Duality.DrawingPixelData
formatId
Type: SystemString
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec Properties

IImageCodec Properties

The IImageCodec type exposes the following members.

Properties
 | Name | Description
Public property | CodecId |
Public property | Priority |
Top
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.CodecId Property

IImageCodecCodecId Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string CodecId { get; }

Property Value

Type: String
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


IImageCodec.Priority Property

IImageCodecPriority Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Priority { get; }

Property Value

Type: Int32
See Also

Reference

IImageCodec Interface
Duality.Drawing Namespace


ImageCodec Class

ImageCodec Class
Inheritance Hierarchy
SystemObject
Duality.DrawingImageCodec

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ImageCodec

The ImageCodec type exposes the following members.

Methods
Name | Description
GetT |
GetRead |
GetWrite |
Top
Fields
Name | Description
FormatBmp |
FormatJpeg |
FormatPng |
FormatTiff |
Top
Properties
Name | Description
AvailableCodecs |
Top
See Also

Reference

Duality.Drawing Namespace


ImageCodec Fields

ImageCodec Fields

The ImageCodec type exposes the following members.

Fields
Name | Description
FormatBmp |
FormatJpeg |
FormatPng |
FormatTiff |
Top
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.FormatBmp Field

ImageCodecFormatBmp Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatBmp

Field Value

Type: String
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.FormatJpeg Field

ImageCodecFormatJpeg Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatJpeg

Field Value

Type: String
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.FormatPng Field

ImageCodecFormatPng Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatPng

Field Value

Type: String
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.FormatTiff Field

ImageCodecFormatTiff Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string FormatTiff

Field Value

Type: String
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec Methods

ImageCodec Methods

The ImageCodec type exposes the following members.

Methods
Name | Description
GetT |
GetRead |
GetWrite |
Top
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.Get(T) Method

ImageCodecGetT Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Get<T>()
where T : class, IImageCodec

Type Parameters

T

Return Value

Type: T
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.GetRead Method

ImageCodecGetRead Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IImageCodec GetRead(
    string formatId
)

Parameters

formatId
Type: SystemString

Return Value

Type: IImageCodec
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.GetWrite Method

ImageCodecGetWrite Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IImageCodec GetWrite(
    string formatId
)

Parameters

formatId
Type: SystemString

Return Value

Type: IImageCodec
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec Properties

ImageCodec Properties

The ImageCodec type exposes the following members.

Properties
Name | Description
AvailableCodecs |
Top
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageCodec.AvailableCodecs Property

ImageCodecAvailableCodecs Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<IImageCodec> AvailableCodecs { get; }

Property Value

Type: IEnumerable IImageCodec
See Also

Reference

ImageCodec Class
Duality.Drawing Namespace


ImageScaleFilter Enumeration

ImageScaleFilter Enumeration
Represents a filtering method for rescaling images.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ImageScaleFilter
Members
Member name | Value | Description
Nearest | 0 | Nearest neighbor filterting / No interpolation.
Linear | 1 | Linear interpolation.
See Also

Reference

Duality.Drawing Namespace


IVertexData Interface

IVertexData Interface
A general interface for different types of vertex data.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IVertexData

The IVertexData type exposes the following members.

Properties
 | Name | Description
Public property | Color | [GET] The vertices color.
Public property | Declaration | [GET] The VertexDeclaration that specifies size, layout and roles of the vertex fields. This member is static by design.
Public property | Pos | [GET] The vertices position.
Top
See Also

Reference

Duality.Drawing Namespace


IVertexData Properties

IVertexData Properties

The IVertexData type exposes the following members.

Properties
 | Name | Description
Public property | Color | [GET] The vertices color.
Public property | Declaration | [GET] The VertexDeclaration that specifies size, layout and roles of the vertex fields. This member is static by design.
Public property | Pos | [GET] The vertices position.
Top
See Also

Reference

IVertexData Interface
Duality.Drawing Namespace


IVertexData.Color Property

IVertexDataColor Property
[GET] The vertices color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
ColorRgba Color { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

IVertexData Interface
Duality.Drawing Namespace


IVertexData.Declaration Property

IVertexDataDeclaration Property
[GET] The VertexDeclaration that specifies size, layout and roles of the vertex fields. This member is static by design.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
VertexDeclaration Declaration { get; }

Property Value

Type: VertexDeclaration
See Also

Reference

IVertexData Interface
Duality.Drawing Namespace


IVertexData.Pos Property

IVertexDataPos Property
[GET] The vertices position.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Vector3 Pos { get; set; }

Property Value

Type: Vector3
See Also

Reference

IVertexData Interface
Duality.Drawing Namespace


IVertexUploader Interface

IVertexUploader Interface

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IVertexUploader

The IVertexUploader type exposes the following members.

Methods
 | Name | Description
Public method | UploadBatchVerticesT |
Top
See Also

Reference

Duality.Drawing Namespace


IVertexUploader Methods

IVertexUploader Methods

The IVertexUploader type exposes the following members.

Methods
 | Name | Description
Public method | UploadBatchVerticesT |
Top
See Also

Reference

IVertexUploader Interface
Duality.Drawing Namespace


IVertexUploader.UploadBatchVertices(T) Method

IVertexUploaderUploadBatchVerticesT Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void UploadBatchVertices<T>(
    VertexDeclaration declaration,
    T[] vertices,
    int vertexCount
)
where T : struct, new(), IVertexData

Parameters

declaration
Type: Duality.DrawingVertexDeclaration
vertices
Type: T
vertexCount
Type: SystemInt32

Type Parameters

T
See Also

Reference

IVertexUploader Interface
Duality.Drawing Namespace


PerspectiveMode Enumeration

PerspectiveMode Enumeration
Specifies the perspective effect that is applied when rendering the world.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum PerspectiveMode
Members
Member name | Value | Description
Flat | 0 | No perspective effect is applied. Z points into the screen and is only used for object sorting.
Parallax | 1 | Objects that are far away appear smaller. Z points into the screen and is used for scaling and sorting.
See Also

Reference

Duality.Drawing Namespace


PixelData Class

PixelData Class
Represents a block of pixel data.
Inheritance Hierarchy
SystemObject
Duality.DrawingPixelData

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class PixelData : ISerializeExplicit

The PixelData type exposes the following members.

Constructors
 | Name | Description
Public method | PixelData | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32) | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32, ColorRgba) | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32, ColorRgba) | Creates a new PixelData object using the specified dimensions and data array. The specified data block will be used directly without copying it first.
Top
Methods
 | Name | Description
Public method | Clone | Clones the pixel data layer and returns the new instance.
Public method | CloneCrop | Crops the Layer, removing transparent / empty border areas.
Public method | CloneRescale | Rescales the Layer, stretching it to the specified size.
Public method | CloneResize | Resizes the Layers boundaries.
Public method | CloneSubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | CloneSubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | ColorTransparentPixels | Sets the color of all transparent pixels based on the non-transparent color values next to them. This does not affect any alpha values but prepares the Layer for correct filtering once uploaded to Texture.
Public method | ColorTransparentPixels(ColorRgba) | Sets the color of all transparent pixels to the specified color.
Public method | Crop | Crops the Layer, removing transparent / empty border areas.
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32) | Performs a drawing operation from this Layer to a target layer.
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32, ColorRgba) | Performs a drawing operation from this Layer to a target layer.
Public method | GetAverageColor | Determines the average color of a Layer.
Public method | GetOpaqueBoundaries | Measures the bounding rectangle of the Layers opaque pixels.
Public method | Rescale | Rescales the Layer, stretching it to the specified size.
Public method | Resize | Resizes the Layers boundaries.
Public method | SetData | Replaces the PixelDatas content with the specified color data. Ownership of the data block will be assumed - it won't be copied before using it.
Public method | SubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | SubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Top
Properties
 | Name | Description
Public property | Data | [GET] The layers pixel data
Public property | Height | [GET] The layers height in pixels
Public property | Item | [GET / SET] A single pixels color.
Public property | Width | [GET] The layers width in pixels
Top
See Also

Reference

Duality.Drawing Namespace


PixelData Constructor

PixelData Constructor
Overload List
 | Name | Description
Public method | PixelData | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32) | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32, ColorRgba) | Initializes a new instance of the PixelData class
Public method | PixelData(Int32, Int32, ColorRgba) | Creates a new PixelData object using the specified dimensions and data array. The specified data block will be used directly without copying it first.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData Constructor

PixelData Constructor
Initializes a new instance of the PixelData class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData()
See Also

Reference

PixelData Class
PixelData Overload
Duality.Drawing Namespace


PixelData Constructor (Int32, Int32)

PixelData Constructor (Int32, Int32)
Initializes a new instance of the PixelData class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData(
    int width,
    int height
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
See Also

Reference

PixelData Class
PixelData Overload
Duality.Drawing Namespace


PixelData Constructor (Int32, Int32, ColorRgba)

PixelData Constructor (Int32, Int32, ColorRgba)
Initializes a new instance of the PixelData class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData(
    int width,
    int height,
    ColorRgba backColor
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
backColor
Type: Duality.DrawingColorRgba
See Also

Reference

PixelData Class
PixelData Overload
Duality.Drawing Namespace


PixelData Constructor (Int32, Int32, ColorRgba[])

PixelData Constructor (Int32, Int32, ColorRgba)
Creates a new PixelData object using the specified dimensions and data array. The specified data block will be used directly without copying it first.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData(
    int width,
    int height,
    ColorRgba[] data
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
data
Type: Duality.DrawingColorRgba
See Also

Reference

PixelData Class
PixelData Overload
Duality.Drawing Namespace


PixelData Methods

PixelData Methods

The PixelData type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Clones the pixel data layer and returns the new instance.
Public method | CloneCrop | Crops the Layer, removing transparent / empty border areas.
Public method | CloneRescale | Rescales the Layer, stretching it to the specified size.
Public method | CloneResize | Resizes the Layers boundaries.
Public method | CloneSubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | CloneSubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | ColorTransparentPixels | Sets the color of all transparent pixels based on the non-transparent color values next to them. This does not affect any alpha values but prepares the Layer for correct filtering once uploaded to Texture.
Public method | ColorTransparentPixels(ColorRgba) | Sets the color of all transparent pixels to the specified color.
Public method | Crop | Crops the Layer, removing transparent / empty border areas.
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32) | Performs a drawing operation from this Layer to a target layer.
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32, ColorRgba) | Performs a drawing operation from this Layer to a target layer.
Public method | GetAverageColor | Determines the average color of a Layer.
Public method | GetOpaqueBoundaries | Measures the bounding rectangle of the Layers opaque pixels.
Public method | Rescale | Rescales the Layer, stretching it to the specified size.
Public method | Resize | Resizes the Layers boundaries.
Public method | SetData | Replaces the PixelDatas content with the specified color data. Ownership of the data block will be assumed - it won't be copied before using it.
Public method | SubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | SubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Clone Method

PixelDataClone Method
Clones the pixel data layer and returns the new instance.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData Clone()

Return Value

Type: PixelData
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.CloneCrop Method

PixelDataCloneCrop Method
Crops the Layer, removing transparent / empty border areas.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData CloneCrop(
    bool cropX = true,
    bool cropY = true
)

Parameters

cropX (Optional)
Type: SystemBoolean
Whether the Layer should be cropped in X-direction
cropY (Optional)
Type: SystemBoolean
Whether the Layer should be cropped in Y-direction

Return Value

Type: PixelData
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.CloneRescale Method

PixelDataCloneRescale Method
Rescales the Layer, stretching it to the specified size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData CloneRescale(
    int w,
    int h,
    ImageScaleFilter filter = ImageScaleFilter.Linear
)

Parameters

w
Type: SystemInt32
h
Type: SystemInt32
filter (Optional)
Type: Duality.DrawingImageScaleFilter
The filtering method to use when rescaling

Return Value

Type: PixelData
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.CloneResize Method

PixelDataCloneResize Method
Resizes the Layers boundaries.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData CloneResize(
    int w,
    int h,
    Alignment origin = Alignment.TopLeft
)

Parameters

w
Type: SystemInt32
h
Type: SystemInt32
origin (Optional)
Type: DualityAlignment

Return Value

Type: PixelData
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.CloneSubImage Method

PixelDataCloneSubImage Method
Overload List
 | Name | Description
Public method | CloneSubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | CloneSubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.CloneSubImage Method (Int32, Int32, Int32, Int32)

PixelDataCloneSubImage Method (Int32, Int32, Int32, Int32)
Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData CloneSubImage(
    int x,
    int y,
    int w,
    int h
)

Parameters

x
Type: SystemInt32
y
Type: SystemInt32
w
Type: SystemInt32
h
Type: SystemInt32

Return Value

Type: PixelData
See Also

Reference

PixelData Class
CloneSubImage Overload
Duality.Drawing Namespace


PixelData.CloneSubImage Method (Int32, Int32, Int32, Int32, ColorRgba)

PixelDataCloneSubImage Method (Int32, Int32, Int32, Int32, ColorRgba)
Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData CloneSubImage(
    int x,
    int y,
    int w,
    int h,
    ColorRgba backColor
)

Parameters

x
Type: SystemInt32
y
Type: SystemInt32
w
Type: SystemInt32
h
Type: SystemInt32
backColor
Type: Duality.DrawingColorRgba

Return Value

Type: PixelData
See Also

Reference

PixelData Class
CloneSubImage Overload
Duality.Drawing Namespace


PixelData.ColorTransparentPixels Method

PixelDataColorTransparentPixels Method
Overload List
 | Name | Description
Public method | ColorTransparentPixels | Sets the color of all transparent pixels based on the non-transparent color values next to them. This does not affect any alpha values but prepares the Layer for correct filtering once uploaded to Texture.
Public method | ColorTransparentPixels(ColorRgba) | Sets the color of all transparent pixels to the specified color.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.ColorTransparentPixels Method

PixelDataColorTransparentPixels Method
Sets the color of all transparent pixels based on the non-transparent color values next to them. This does not affect any alpha values but prepares the Layer for correct filtering once uploaded to Texture.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ColorTransparentPixels()
See Also

Reference

PixelData Class
ColorTransparentPixels Overload
Duality.Drawing Namespace


PixelData.ColorTransparentPixels Method (ColorRgba)

PixelDataColorTransparentPixels Method (ColorRgba)
Sets the color of all transparent pixels to the specified color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ColorTransparentPixels(
    ColorRgba transparentColor
)

Parameters

transparentColor
Type: Duality.DrawingColorRgba
See Also

Reference

PixelData Class
ColorTransparentPixels Overload
Duality.Drawing Namespace


PixelData.Crop Method

PixelDataCrop Method
Crops the Layer, removing transparent / empty border areas.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Crop(
    bool cropX = true,
    bool cropY = true
)

Parameters

cropX (Optional)
Type: SystemBoolean
Whether the Layer should be cropped in X-direction
cropY (Optional)
Type: SystemBoolean
Whether the Layer should be cropped in Y-direction
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.DrawOnto Method

PixelDataDrawOnto Method
Overload List
 | Name | Description
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32) | Performs a drawing operation from this Layer to a target layer.
Public method | DrawOnto(PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32, ColorRgba) | Performs a drawing operation from this Layer to a target layer.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.DrawOnto Method (PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32)

PixelDataDrawOnto Method (PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32)
Performs a drawing operation from this Layer to a target layer.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOnto(
    PixelData target,
    BlendMode blend,
    int destX,
    int destY,
    int width = -1,
    int height = -1,
    int srcX = 0,
    int srcY = 0
)

Parameters

target
Type: Duality.DrawingPixelData
blend
Type: Duality.DrawingBlendMode
destX
Type: SystemInt32
destY
Type: SystemInt32
width (Optional)
Type: SystemInt32
height (Optional)
Type: SystemInt32
srcX (Optional)
Type: SystemInt32
srcY (Optional)
Type: SystemInt32
See Also

Reference

PixelData Class
DrawOnto Overload
Duality.Drawing Namespace


PixelData.DrawOnto Method (PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32, ColorRgba)

PixelDataDrawOnto Method (PixelData, BlendMode, Int32, Int32, Int32, Int32, Int32, Int32, ColorRgba)
Performs a drawing operation from this Layer to a target layer.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void DrawOnto(
    PixelData target,
    BlendMode blend,
    int destX,
    int destY,
    int width,
    int height,
    int srcX,
    int srcY,
    ColorRgba colorTint
)

Parameters

target
Type: Duality.DrawingPixelData
blend
Type: Duality.DrawingBlendMode
destX
Type: SystemInt32
destY
Type: SystemInt32
width
Type: SystemInt32
height
Type: SystemInt32
srcX
Type: SystemInt32
srcY
Type: SystemInt32
colorTint
Type: Duality.DrawingColorRgba
See Also

Reference

PixelData Class
DrawOnto Overload
Duality.Drawing Namespace


PixelData.GetAverageColor Method

PixelDataGetAverageColor Method
Determines the average color of a Layer.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba GetAverageColor(
    bool weightTransparent = true
)

Parameters

weightTransparent (Optional)
Type: SystemBoolean
If true, the alpha value weights a pixels color value.

Return Value

Type: ColorRgba
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.GetOpaqueBoundaries Method

PixelDataGetOpaqueBoundaries Method
Measures the bounding rectangle of the Layers opaque pixels.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void GetOpaqueBoundaries(
    out Point2 topLeft,
    out Point2 size
)

Parameters

topLeft
Type: DualityPoint2
size
Type: DualityPoint2
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Rescale Method

PixelDataRescale Method
Rescales the Layer, stretching it to the specified size.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Rescale(
    int w,
    int h,
    ImageScaleFilter filter = ImageScaleFilter.Linear
)

Parameters

w
Type: SystemInt32
h
Type: SystemInt32
filter (Optional)
Type: Duality.DrawingImageScaleFilter
The filtering method to use when rescaling
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Resize Method

PixelDataResize Method
Resizes the Layers boundaries.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Resize(
    int w,
    int h,
    Alignment origin = Alignment.TopLeft
)

Parameters

w
Type: SystemInt32
h
Type: SystemInt32
origin (Optional)
Type: DualityAlignment
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.SetData Method

PixelDataSetData Method
Replaces the PixelDatas content with the specified color data. Ownership of the data block will be assumed - it won't be copied before using it.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetData(
    ColorRgba[] pixelData,
    int width = -1,
    int height = -1
)

Parameters

pixelData
Type: Duality.DrawingColorRgba
width (Optional)
Type: SystemInt32
height (Optional)
Type: SystemInt32
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.SubImage Method

PixelDataSubImage Method
Overload List
 | Name | Description
Public method | SubImage(Int32, Int32, Int32, Int32) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Public method | SubImage(Int32, Int32, Int32, Int32, ColorRgba) | Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.SubImage Method (Int32, Int32, Int32, Int32)

PixelDataSubImage Method (Int32, Int32, Int32, Int32)
Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SubImage(
    int x,
    int y,
    int w,
    int h
)

Parameters

x
Type: SystemInt32
y
Type: SystemInt32
w
Type: SystemInt32
h
Type: SystemInt32
See Also

Reference

PixelData Class
SubImage Overload
Duality.Drawing Namespace


PixelData.SubImage Method (Int32, Int32, Int32, Int32, ColorRgba)

PixelDataSubImage Method (Int32, Int32, Int32, Int32, ColorRgba)
Extracts a rectangular region of this Layer. If the extracted region is bigger than the original Layer, all new space is filled with a background color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SubImage(
    int x,
    int y,
    int w,
    int h,
    ColorRgba backColor
)

Parameters

x
Type: SystemInt32
y
Type: SystemInt32
w
Type: SystemInt32
h
Type: SystemInt32
backColor
Type: Duality.DrawingColorRgba
See Also

Reference

PixelData Class
SubImage Overload
Duality.Drawing Namespace


PixelData Properties

PixelData Properties

The PixelData type exposes the following members.

Properties
 | Name | Description
Public property | Data | [GET] The layers pixel data
Public property | Height | [GET] The layers height in pixels
Public property | Item | [GET / SET] A single pixels color.
Public property | Width | [GET] The layers width in pixels
Top
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Data Property

PixelDataData Property
[GET] The layers pixel data

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba[] Data { get; }

Property Value

Type: ColorRgba
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Height Property

PixelDataHeight Property
[GET] The layers height in pixels

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Item Property

PixelDataItem Property
[GET / SET] A single pixels color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba this[
    int x,
    int y
] { get; set; }

Parameters

x
Type: SystemInt32
y
Type: SystemInt32

Return Value

Type: ColorRgba
See Also

Reference

PixelData Class
Duality.Drawing Namespace


PixelData.Width Property

PixelDataWidth Property
[GET] The layers width in pixels

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; }

Property Value

Type: Int32
See Also

Reference

PixelData Class
Duality.Drawing Namespace


RenderMatrix Enumeration

RenderMatrix Enumeration
Specifies a rendering matrix setup.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum RenderMatrix
Members
Member name | Value | Description
PerspectiveWorld | 0 |
OrthoScreen | 1 |
See Also

Reference

Duality.Drawing Namespace


ScreenResolution Structure

ScreenResolution Structure

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct ScreenResolution

The ScreenResolution type exposes the following members.

Constructors
 | Name | Description
Public method | ScreenResolution | Initializes a new instance of the ScreenResolution class
Top
Properties
 | Name | Description
Public property | Height |
Public property | RefreshRate |
Public property | Width |
Top
See Also

Reference

Duality.Drawing Namespace


ScreenResolution Constructor

ScreenResolution Constructor
Initializes a new instance of the ScreenResolution class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ScreenResolution(
    int width,
    int height,
    float refreshRate
)

Parameters

width
Type: SystemInt32
height
Type: SystemInt32
refreshRate
Type: SystemSingle
See Also

Reference

ScreenResolution Structure
Duality.Drawing Namespace


ScreenResolution Properties

ScreenResolution Properties

The ScreenResolution type exposes the following members.

Properties
 | Name | Description
Public property | Height |
Public property | RefreshRate |
Public property | Width |
Top
See Also

Reference

ScreenResolution Structure
Duality.Drawing Namespace


ScreenResolution.Height Property

ScreenResolutionHeight Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

ScreenResolution Structure
Duality.Drawing Namespace


ScreenResolution.RefreshRate Property

ScreenResolutionRefreshRate Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RefreshRate { get; }

Property Value

Type: Single
See Also

Reference

ScreenResolution Structure
Duality.Drawing Namespace


ScreenResolution.Width Property

ScreenResolutionWidth Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; }

Property Value

Type: Int32
See Also

Reference

ScreenResolution Structure
Duality.Drawing Namespace


TextureMagFilter Enumeration

TextureMagFilter Enumeration
Defines which filtering algorithm will be used when displaying the Texture larger than it is.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum TextureMagFilter
Members
Member name | Value | Description
Nearest | 0 | Point filtering with sharp edges.
Linear | 1 | Linear interpolation.
See Also

Reference

Duality.Drawing Namespace


TextureMinFilter Enumeration

TextureMinFilter Enumeration
Defines which filtering algorithm will be used when displaying the Texture smaller than it is.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum TextureMinFilter
Members
Member name | Value | Description
Nearest | 0 | Point filtering with sharp edges.
Linear | 1 | Linear interpolation.
NearestMipmapNearest | 2 | Point filtering with sharp edges. Mipmaps will be used, but switch from one to the next instantly.
LinearMipmapNearest | 3 | Linear interpolation. Mipmaps will be used, but switch from one to the next instantly.
NearestMipmapLinear | 4 | Point filtering with sharp edges. Mipmaps will be used and smoothly blend over from one to the next.
LinearMipmapLinear | 5 | Linear interpolation. Mipmaps will be used and smoothly blend over from one to the next.
See Also

Reference

Duality.Drawing Namespace


TexturePixelFormat Enumeration

TexturePixelFormat Enumeration
Defines the format that is used to store the Textures pixel data.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum TexturePixelFormat
Members
Member name | Value | Description
Single | 0 |
Dual | 1 |
Rgb | 2 |
Rgba | 3 |
FloatSingle | 4 |
FloatDual | 5 |
FloatRgb | 6 |
FloatRgba | 7 |
CompressedSingle | 8 |
CompressedDual | 9 |
CompressedRgb | 10 |
CompressedRgba | 11 |
See Also

Reference

Duality.Drawing Namespace


TextureSizeMode Enumeration

TextureSizeMode Enumeration
Defines how a Texture should handle pixel data without power-of-two dimensions.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum TextureSizeMode
Members
Member name | Value | Description
Enlarge | 0 | Enlarges the images dimensions without scaling the image, leaving the new space empty. Texture coordinates are automatically adjusted in order to display the image correctly. This preserves the images full quality but prevents tiling, if not power-of-two anyway.
Stretch | 1 | Stretches the image to fit power-of-two dimensions and downscales it again when displaying. This might blur the image slightly but allows tiling it.
NonPowerOfTwo | 2 | The images dimensions are not affected, as OpenGL uses an actual non-power-of-two texture. However, this might be unsupported on older hardware.
Default | 0 | The default behaviour. Equals Enlarge.
See Also

Reference

Duality.Drawing Namespace


TextureWrapMode Enumeration

TextureWrapMode Enumeration
Defines how Texture coordinates outside the regular [0 - 1] range will be handled.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum TextureWrapMode
Members
Member name | Value | Description
Clamp | 0 |
Repeat | 1 |
MirroredRepeat | 2 |
See Also

Reference

Duality.Drawing Namespace


VertexC1P3 Structure

VertexC1P3 Structure
Vertex data providing each vertex a position (3x4 byte) and color (1x4 byte).

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct VertexC1P3 : IVertexData

The VertexC1P3 type exposes the following members.

Fields
 | Name | Description
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Top
See Also

Reference

Duality.Drawing Namespace


VertexC1P3 Fields

VertexC1P3 Fields

The VertexC1P3 type exposes the following members.

Fields
 | Name | Description
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Top
See Also

Reference

VertexC1P3 Structure
Duality.Drawing Namespace


VertexC1P3.Color Field

VertexC1P3Color Field
The vertices color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba Color

Field Value

Type: ColorRgba
See Also

Reference

VertexC1P3 Structure
Duality.Drawing Namespace


VertexC1P3.Declaration Field

VertexC1P3Declaration Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly VertexDeclaration Declaration

Field Value

Type: VertexDeclaration
See Also

Reference

VertexC1P3 Structure
Duality.Drawing Namespace


VertexC1P3.Pos Field

VertexC1P3Pos Field
The vertices position.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos

Field Value

Type: Vector3
See Also

Reference

VertexC1P3 Structure
Duality.Drawing Namespace


VertexC1P3T2 Structure

VertexC1P3T2 Structure
Vertex data providing each vertex a position (3x4 byte), color (1x4 byte) and texture coordinate (2x4 byte)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct VertexC1P3T2 : IVertexData

The VertexC1P3T2 type exposes the following members.

Fields
 | Name | Description
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Public field | TexCoord | The vertices texture coordinate.
Top
See Also

Reference

Duality.Drawing Namespace


VertexC1P3T2 Fields

VertexC1P3T2 Fields

The VertexC1P3T2 type exposes the following members.

Fields
 | Name | Description
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Public field | TexCoord | The vertices texture coordinate.
Top
See Also

Reference

VertexC1P3T2 Structure
Duality.Drawing Namespace


VertexC1P3T2.Color Field

VertexC1P3T2Color Field
The vertices color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba Color

Field Value

Type: ColorRgba
See Also

Reference

VertexC1P3T2 Structure
Duality.Drawing Namespace


VertexC1P3T2.Declaration Field

VertexC1P3T2Declaration Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly VertexDeclaration Declaration

Field Value

Type: VertexDeclaration
See Also

Reference

VertexC1P3T2 Structure
Duality.Drawing Namespace


VertexC1P3T2.Pos Field

VertexC1P3T2Pos Field
The vertices position.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos

Field Value

Type: Vector3
See Also

Reference

VertexC1P3T2 Structure
Duality.Drawing Namespace


VertexC1P3T2.TexCoord Field

VertexC1P3T2TexCoord Field
The vertices texture coordinate.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 TexCoord

Field Value

Type: Vector2
See Also

Reference

VertexC1P3T2 Structure
Duality.Drawing Namespace


VertexC1P3T4A1 Structure

VertexC1P3T4A1 Structure
Vertex data providing each vertex a position (3x4 byte), color (1x4 byte), two texture coordinates (4x4 byte) and a custom float vertex attribute (1x4 byte).

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct VertexC1P3T4A1 : IVertexData

The VertexC1P3T4A1 type exposes the following members.

Fields
 | Name | Description
Public field | Attrib | The vertices custom attribute.
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Public field | TexCoord | The vertices texture coordinates (two of them).
Top
See Also

Reference

Duality.Drawing Namespace


VertexC1P3T4A1 Fields

VertexC1P3T4A1 Fields

The VertexC1P3T4A1 type exposes the following members.

Fields
 | Name | Description
Public field | Attrib | The vertices custom attribute.
Public field | Color | The vertices color.
 | Declaration |
Public field | Pos | The vertices position.
Public field | TexCoord | The vertices texture coordinates (two of them).
Top
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexC1P3T4A1.Attrib Field

VertexC1P3T4A1Attrib Field
The vertices custom attribute.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Attrib

Field Value

Type: Single
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexC1P3T4A1.Color Field

VertexC1P3T4A1Color Field
The vertices color.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba Color

Field Value

Type: ColorRgba
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexC1P3T4A1.Declaration Field

VertexC1P3T4A1Declaration Field

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly VertexDeclaration Declaration

Field Value

Type: VertexDeclaration
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexC1P3T4A1.Pos Field

VertexC1P3T4A1Pos Field
The vertices position.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector3 Pos

Field Value

Type: Vector3
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexC1P3T4A1.TexCoord Field

VertexC1P3T4A1TexCoord Field
The vertices texture coordinates (two of them).

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector4 TexCoord

Field Value

Type: Vector4
See Also

Reference

VertexC1P3T4A1 Structure
Duality.Drawing Namespace


VertexDeclaration Class

VertexDeclaration Class
Inheritance Hierarchy
SystemObject
Duality.DrawingVertexDeclaration

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class VertexDeclaration

The VertexDeclaration type exposes the following members.

Methods
Name | Description
Get(Type) |
GetT |
Top
Properties
 | Name | Description
Public property | DataType |
Public property | Elements |
Public property | Size |
Public property | TypeIndex |
Top
See Also

Reference

Duality.Drawing Namespace


VertexDeclaration Methods

VertexDeclaration Methods
Methods
Name | Description
Get(Type) |
GetT |
Top
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.Get Method

VertexDeclarationGet Method
Overload List
Name | Description
GetT |
Get(Type) |
Top
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.Get(T) Method

VertexDeclarationGetT Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VertexDeclaration Get<T>()
where T : struct, new(), IVertexData

Type Parameters

T

Return Value

Type: VertexDeclaration
See Also

Reference

VertexDeclaration Class
Get Overload
Duality.Drawing Namespace


VertexDeclaration.Get Method (Type)

VertexDeclarationGet Method (Type)

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static VertexDeclaration Get(
    Type vertexType
)

Parameters

vertexType
Type: SystemType

Return Value

Type: VertexDeclaration
See Also

Reference

VertexDeclaration Class
Get Overload
Duality.Drawing Namespace


VertexDeclaration Properties

VertexDeclaration Properties

The VertexDeclaration type exposes the following members.

Properties
 | Name | Description
Public property | DataType |
Public property | Elements |
Public property | Size |
Public property | TypeIndex |
Top
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.DataType Property

VertexDeclarationDataType Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type DataType { get; }

Property Value

Type: Type
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.Elements Property

VertexDeclarationElements Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElement[] Elements { get; }

Property Value

Type: VertexElement
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.Size Property

VertexDeclarationSize Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Size { get; }

Property Value

Type: Int32
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexDeclaration.TypeIndex Property

VertexDeclarationTypeIndex Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int TypeIndex { get; }

Property Value

Type: Int32
See Also

Reference

VertexDeclaration Class
Duality.Drawing Namespace


VertexElement Structure

VertexElement Structure

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct VertexElement

The VertexElement type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Properties
 | Name | Description
Public property | Count |
Public property | Offset |
Public property | Role |
Public property | Type |
Top
See Also

Reference

Duality.Drawing Namespace


VertexElement Methods

VertexElement Methods

The VertexElement type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement.ToString Method

VertexElementToString Method

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement Properties

VertexElement Properties

The VertexElement type exposes the following members.

Properties
 | Name | Description
Public property | Count |
Public property | Offset |
Public property | Role |
Public property | Type |
Top
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement.Count Property

VertexElementCount Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement.Offset Property

VertexElementOffset Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IntPtr Offset { get; }

Property Value

Type: IntPtr
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement.Role Property

VertexElementRole Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementRole Role { get; }

Property Value

Type: VertexElementRole
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElement.Type Property

VertexElementType Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementType Type { get; }

Property Value

Type: VertexElementType
See Also

Reference

VertexElement Structure
Duality.Drawing Namespace


VertexElementAttribute Class

VertexElementAttribute Class
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.DrawingVertexElementAttribute

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class VertexElementAttribute : Attribute

The VertexElementAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | VertexElementAttribute(VertexElementRole) | Initializes a new instance of the VertexElementAttribute class
Public method | VertexElementAttribute(VertexElementType, Int32, VertexElementRole) | Initializes a new instance of the VertexElementAttribute class
Top
Properties
 | Name | Description
Public property | Count |
Public property | Role |
Public property | Type |
Top
See Also

Reference

Duality.Drawing Namespace


VertexElementAttribute Constructor

VertexElementAttribute Constructor
Overload List
 | Name | Description
Public method | VertexElementAttribute(VertexElementRole) | Initializes a new instance of the VertexElementAttribute class
Public method | VertexElementAttribute(VertexElementType, Int32, VertexElementRole) | Initializes a new instance of the VertexElementAttribute class
Top
See Also

Reference

VertexElementAttribute Class
Duality.Drawing Namespace


VertexElementAttribute Constructor (VertexElementRole)

VertexElementAttribute Constructor (VertexElementRole)
Initializes a new instance of the VertexElementAttribute class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementAttribute(
    VertexElementRole role
)

Parameters

role
Type: Duality.DrawingVertexElementRole
See Also

Reference

VertexElementAttribute Class
VertexElementAttribute Overload
Duality.Drawing Namespace


VertexElementAttribute Constructor (VertexElementType, Int32, VertexElementRole)

VertexElementAttribute Constructor (VertexElementType, Int32, VertexElementRole)
Initializes a new instance of the VertexElementAttribute class

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementAttribute(
    VertexElementType type,
    int count,
    VertexElementRole role = VertexElementRole.Unknown
)

Parameters

type
Type: Duality.DrawingVertexElementType
count
Type: SystemInt32
role (Optional)
Type: Duality.DrawingVertexElementRole
See Also

Reference

VertexElementAttribute Class
VertexElementAttribute Overload
Duality.Drawing Namespace


VertexElementAttribute Properties

VertexElementAttribute Properties

The VertexElementAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Count |
Public property | Role |
Public property | Type |
Top
See Also

Reference

VertexElementAttribute Class
Duality.Drawing Namespace


VertexElementAttribute.Count Property

VertexElementAttributeCount Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32
See Also

Reference

VertexElementAttribute Class
Duality.Drawing Namespace


VertexElementAttribute.Role Property

VertexElementAttributeRole Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementRole Role { get; }

Property Value

Type: VertexElementRole
See Also

Reference

VertexElementAttribute Class
Duality.Drawing Namespace


VertexElementAttribute.Type Property

VertexElementAttributeType Property

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexElementType Type { get; }

Property Value

Type: VertexElementType
See Also

Reference

VertexElementAttribute Class
Duality.Drawing Namespace


VertexElementRole Enumeration

VertexElementRole Enumeration

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum VertexElementRole
Members
Member name | Value | Description
Unknown | 0 |
Position | 1 |
TexCoord | 2 |
Color | 3 |
See Also

Reference

Duality.Drawing Namespace


VertexElementType Enumeration

VertexElementType Enumeration

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum VertexElementType
Members
Member name | Value | Description
Unknown | 0 |
Byte | 1 |
Float | 2 |
See Also

Reference

Duality.Drawing Namespace


VertexMode Enumeration

VertexMode Enumeration
Specifies the way in which incoming vertex data is interpreted in order to generate geometry.

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum VertexMode
Members
Member name | Value | Description
Points | 0 |
Lines | 1 |
LineStrip | 2 |
LineLoop | 3 |
Triangles | 4 |
TriangleStrip | 5 |
TriangleFan | 6 |
Quads | 7 |
See Also

Reference

Duality.Drawing Namespace


VisibilityFlag Enumeration

VisibilityFlag Enumeration

Namespace: Duality.Drawing
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum VisibilityFlag
Members
Member name | Value | Description
None | 0 |
Group0 | 1 |
Group1 | 2 |
Group2 | 4 |
Group3 | 8 |
Group4 | 16 |
Group5 | 32 |
Group6 | 64 |
Group7 | 128 |
Group8 | 256 |
Group9 | 512 |
Group10 | 1024 |
Group11 | 2048 |
Group12 | 4096 |
Group13 | 8192 |
Group14 | 16384 |
Group15 | 32768 |
Group16 | 65536 |
Group17 | 131072 |
Group18 | 262144 |
Group19 | 524288 |
Group20 | 1048576 |
Group21 | 2097152 |
Group22 | 4194304 |
Group23 | 8388608 |
Group24 | 16777216 |
Group25 | 33554432 |
Group26 | 67108864 |
Group27 | 134217728 |
Group28 | 268435456 |
Group29 | 536870912 |
Group30 | 1073741824 |
ScreenOverlay | 2147483648 | Special flag. This flag is set when rendering screen overlays.
All | 4294967295 |
AllFlags | 2147483648 |
AllGroups | 2147483647 |
See Also

Reference

Duality.Drawing Namespace


Duality.Editor Namespace

Duality.Editor Namespace
Classes
 | Class | Description
Public class | EditorHintAttribute | An attribute that provides information about a Types or Members preferred editor behaviour.
Public class | EditorHintCategoryAttribute | Provides information about a Types editor category.
Public class | EditorHintDecimalPlacesAttribute | Provides information about a numerical members decimal accuracy
Public class | EditorHintFlagsAttribute | Provides general information about a members preferred editor behaviour.
Public class | EditorHintImageAttribute | Provides an icon or image that can be used to represent the given Type within the editor.
Public class | EditorHintIncrementAttribute | Provides information about a numerical members value increment.
Public class | EditorHintRangeAttribute | Provides information about a numerical members allowed value range.
Delegates
 | Delegate | Description
Public delegate | EditorHintImageAttributeResolver |
Enumerations
 | Enumeration | Description
Public enumeration | MemberFlags | Some general flags for Type members that indicate preferred editor behaviour.


EditorHintAttribute Class

EditorHintAttribute Class
An attribute that provides information about a Types or Members preferred editor behaviour.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
More...

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class EditorHintAttribute : Attribute

The EditorHintAttribute type exposes the following members.

Constructors
 | Name | Description
Protected method | EditorHintAttribute | Initializes a new instance of the EditorHintAttribute class
Top
Methods
Name | Description
GetT | Retrieves the specified editor hint attribute from a member, if existing.
GetAllT | Retrieves the specified editor hint attributes from a member, if existing.
Top
See Also

Reference

Duality.Editor Namespace
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintCategoryAttribute
Duality.EditorEditorHintDecimalPlacesAttribute
Duality.EditorEditorHintFlagsAttribute
Duality.EditorEditorHintImageAttribute
Duality.EditorEditorHintIncrementAttribute
Duality.EditorEditorHintRangeAttribute


EditorHintAttribute Constructor

EditorHintAttribute Constructor
Initializes a new instance of the EditorHintAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected EditorHintAttribute()
See Also

Reference

EditorHintAttribute Class
Duality.Editor Namespace


EditorHintAttribute Methods

EditorHintAttribute Methods

The EditorHintAttribute type exposes the following members.

Methods
Name | Description
GetT | Retrieves the specified editor hint attribute from a member, if existing.
GetAllT | Retrieves the specified editor hint attributes from a member, if existing.
Top
See Also

Reference

EditorHintAttribute Class
Duality.Editor Namespace


EditorHintAttribute.Get(T) Method

EditorHintAttributeGetT Method
Retrieves the specified editor hint attribute from a member, if existing.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T Get<T>(
    MemberInfo member,
    IEnumerable<EditorHintAttribute> overrideHints = null
)
where T : EditorHintAttribute

Parameters

member
Type: System.ReflectionMemberInfo
The member to extract the hint from. May be null.
overrideHints (Optional)
Type: System.Collections.GenericIEnumerable EditorHintAttribute

Type Parameters

T
The Type of editor hint to retrieve.

Return Value

Type: T
See Also

Reference

EditorHintAttribute Class
Duality.Editor Namespace


EditorHintAttribute.GetAll(T) Method

EditorHintAttributeGetAllT Method
Retrieves the specified editor hint attributes from a member, if existing.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<T> GetAll<T>(
    MemberInfo member,
    IEnumerable<EditorHintAttribute> overrideHints = null
)
where T : EditorHintAttribute

Parameters

member
Type: System.ReflectionMemberInfo
The member to extract the hints from. May be null.
overrideHints (Optional)
Type: System.Collections.GenericIEnumerable EditorHintAttribute
An optional collection of override hints, that will be preferred, if applicable.

Type Parameters

T
The Type of editor hints to retrieve.

Return Value

Type: IEnumerable T
See Also

Reference

EditorHintAttribute Class
Duality.Editor Namespace


EditorHintCategoryAttribute Class

EditorHintCategoryAttribute Class
Provides information about a Types editor category.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintCategoryAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintCategoryAttribute : EditorHintAttribute

The EditorHintCategoryAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintCategoryAttribute | Initializes a new instance of the EditorHintCategoryAttribute class
Top
Properties
 | Name | Description
Public property | Category | [GET] The preferred category tree to fit this Type in.
Public property | CategoryTree | [GET] The preferred category tree to fit this Type in, split into hierarchial tokens.
Top
See Also

Reference

Duality.Editor Namespace


EditorHintCategoryAttribute Constructor

EditorHintCategoryAttribute Constructor
Initializes a new instance of the EditorHintCategoryAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintCategoryAttribute(
    string category
)

Parameters

category
Type: SystemString
See Also

Reference

EditorHintCategoryAttribute Class
Duality.Editor Namespace


EditorHintCategoryAttribute Properties

EditorHintCategoryAttribute Properties

The EditorHintCategoryAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Category | [GET] The preferred category tree to fit this Type in.
Public property | CategoryTree | [GET] The preferred category tree to fit this Type in, split into hierarchial tokens.
Top
See Also

Reference

EditorHintCategoryAttribute Class
Duality.Editor Namespace


EditorHintCategoryAttribute.Category Property

EditorHintCategoryAttributeCategory Property
[GET] The preferred category tree to fit this Type in.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Category { get; }

Property Value

Type: String
See Also

Reference

EditorHintCategoryAttribute Class
Duality.Editor Namespace


EditorHintCategoryAttribute.CategoryTree Property

EditorHintCategoryAttributeCategoryTree Property
[GET] The preferred category tree to fit this Type in, split into hierarchial tokens.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string[] CategoryTree { get; }

Property Value

Type: String
See Also

Reference

EditorHintCategoryAttribute Class
Duality.Editor Namespace


EditorHintDecimalPlacesAttribute Class

EditorHintDecimalPlacesAttribute Class
Provides information about a numerical members decimal accuracy
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintDecimalPlacesAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintDecimalPlacesAttribute : EditorHintAttribute

The EditorHintDecimalPlacesAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintDecimalPlacesAttribute | Initializes a new instance of the EditorHintDecimalPlacesAttribute class
Top
Properties
 | Name | Description
Public property | Places | [GET] The preferred number of displayed decimal places
Top
See Also

Reference

Duality.Editor Namespace


EditorHintDecimalPlacesAttribute Constructor

EditorHintDecimalPlacesAttribute Constructor
Initializes a new instance of the EditorHintDecimalPlacesAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintDecimalPlacesAttribute(
    int places
)

Parameters

places
Type: SystemInt32
See Also

Reference

EditorHintDecimalPlacesAttribute Class
Duality.Editor Namespace


EditorHintDecimalPlacesAttribute Properties

EditorHintDecimalPlacesAttribute Properties

The EditorHintDecimalPlacesAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Places | [GET] The preferred number of displayed decimal places
Top
See Also

Reference

EditorHintDecimalPlacesAttribute Class
Duality.Editor Namespace


EditorHintDecimalPlacesAttribute.Places Property

EditorHintDecimalPlacesAttributePlaces Property
[GET] The preferred number of displayed decimal places

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Places { get; }

Property Value

Type: Int32
See Also

Reference

EditorHintDecimalPlacesAttribute Class
Duality.Editor Namespace


EditorHintFlagsAttribute Class

EditorHintFlagsAttribute Class
Provides general information about a members preferred editor behaviour.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintFlagsAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintFlagsAttribute : EditorHintAttribute

The EditorHintFlagsAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintFlagsAttribute | Initializes a new instance of the EditorHintFlagsAttribute class
Top
Properties
 | Name | Description
Public property | Flags | [GET] Flags that indicate the members general behaviour
Top
See Also

Reference

Duality.Editor Namespace


EditorHintFlagsAttribute Constructor

EditorHintFlagsAttribute Constructor
Initializes a new instance of the EditorHintFlagsAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintFlagsAttribute(
    MemberFlags flags
)

Parameters

flags
Type: Duality.EditorMemberFlags
See Also

Reference

EditorHintFlagsAttribute Class
Duality.Editor Namespace


EditorHintFlagsAttribute Properties

EditorHintFlagsAttribute Properties

The EditorHintFlagsAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Flags | [GET] Flags that indicate the members general behaviour
Top
See Also

Reference

EditorHintFlagsAttribute Class
Duality.Editor Namespace


EditorHintFlagsAttribute.Flags Property

EditorHintFlagsAttributeFlags Property
[GET] Flags that indicate the members general behaviour

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MemberFlags Flags { get; }

Property Value

Type: MemberFlags
See Also

Reference

EditorHintFlagsAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute Class

EditorHintImageAttribute Class
Provides an icon or image that can be used to represent the given Type within the editor.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintImageAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintImageAttribute : EditorHintAttribute

The EditorHintImageAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintImageAttribute | Initializes a new instance of the EditorHintImageAttribute class
Top
Properties
 | Name | Description
Public property | IconImageObject | [GET] The icon image object that will be used to represent this Type.
Top
Events
Name | Description
ImageResolvers |
Top
See Also

Reference

Duality.Editor Namespace


EditorHintImageAttribute Constructor

EditorHintImageAttribute Constructor
Initializes a new instance of the EditorHintImageAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintImageAttribute(
    string manifestResourceName
)

Parameters

manifestResourceName
Type: SystemString
See Also

Reference

EditorHintImageAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute Properties

EditorHintImageAttribute Properties

The EditorHintImageAttribute type exposes the following members.

Properties
 | Name | Description
Public property | IconImageObject | [GET] The icon image object that will be used to represent this Type.
Top
See Also

Reference

EditorHintImageAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute.IconImageObject Property

EditorHintImageAttributeIconImageObject Property
[GET] The icon image object that will be used to represent this Type.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object IconImageObject { get; }

Property Value

Type: Object
See Also

Reference

EditorHintImageAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute Events

EditorHintImageAttribute Events

The EditorHintImageAttribute type exposes the following members.

Events
Name | Description
ImageResolvers |
Top
See Also

Reference

EditorHintImageAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute.ImageResolvers Event

EditorHintImageAttributeImageResolvers Event

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EditorHintImageAttributeResolver ImageResolvers

Value

Type: Duality.EditorEditorHintImageAttributeResolver
See Also

Reference

EditorHintImageAttribute Class
Duality.Editor Namespace


EditorHintImageAttribute.Resolver Delegate

EditorHintImageAttributeResolver Delegate

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate Object Resolver(
    string manifestResourceName
)

Parameters

manifestResourceName
Type: SystemString

Return Value

Type: Object
See Also

Reference

Duality.Editor Namespace


EditorHintIncrementAttribute Class

EditorHintIncrementAttribute Class
Provides information about a numerical members value increment.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintIncrementAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintIncrementAttribute : EditorHintAttribute

The EditorHintIncrementAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintIncrementAttribute(Int32) | Initializes a new instance of the EditorHintIncrementAttribute class
Public method | EditorHintIncrementAttribute(Single) | Initializes a new instance of the EditorHintIncrementAttribute class
Top
Properties
 | Name | Description
Public property | Increment | [GET] The members value increment.
Top
See Also

Reference

Duality.Editor Namespace


EditorHintIncrementAttribute Constructor

EditorHintIncrementAttribute Constructor
Overload List
 | Name | Description
Public method | EditorHintIncrementAttribute(Int32) | Initializes a new instance of the EditorHintIncrementAttribute class
Public method | EditorHintIncrementAttribute(Single) | Initializes a new instance of the EditorHintIncrementAttribute class
Top
See Also

Reference

EditorHintIncrementAttribute Class
Duality.Editor Namespace


EditorHintIncrementAttribute Constructor (Int32)

EditorHintIncrementAttribute Constructor (Int32)
Initializes a new instance of the EditorHintIncrementAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintIncrementAttribute(
    int inc
)

Parameters

inc
Type: SystemInt32
See Also

Reference

EditorHintIncrementAttribute Class
EditorHintIncrementAttribute Overload
Duality.Editor Namespace


EditorHintIncrementAttribute Constructor (Single)

EditorHintIncrementAttribute Constructor (Single)
Initializes a new instance of the EditorHintIncrementAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintIncrementAttribute(
    float inc
)

Parameters

inc
Type: SystemSingle
See Also

Reference

EditorHintIncrementAttribute Class
EditorHintIncrementAttribute Overload
Duality.Editor Namespace


EditorHintIncrementAttribute Properties

EditorHintIncrementAttribute Properties

The EditorHintIncrementAttribute type exposes the following members.

Properties
 | Name | Description
Public property | Increment | [GET] The members value increment.
Top
See Also

Reference

EditorHintIncrementAttribute Class
Duality.Editor Namespace


EditorHintIncrementAttribute.Increment Property

EditorHintIncrementAttributeIncrement Property
[GET] The members value increment.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public decimal Increment { get; }

Property Value

Type: Decimal
See Also

Reference

EditorHintIncrementAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute Class

EditorHintRangeAttribute Class
Provides information about a numerical members allowed value range.
Inheritance Hierarchy
SystemObject
SystemAttribute
Duality.EditorEditorHintAttribute
Duality.EditorEditorHintRangeAttribute

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class EditorHintRangeAttribute : EditorHintAttribute

The EditorHintRangeAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | EditorHintRangeAttribute(Int32, Int32) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Single, Single) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Int32, Int32, Int32, Int32) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Single, Single, Single, Single) | Initializes a new instance of the EditorHintRangeAttribute class
Top
Properties
 | Name | Description
Public property | LimitMaximum | [GET] The members limiting maximum value.
Public property | LimitMinimum | [GET] The members limiting minimum value.
Public property | ReasonableMaximum | [GET] The members reasonable (non-limiting) maximum value.
Public property | ReasonableMinimum | [GET] The members reasonable (non-limiting) minimum value.
Top
See Also

Reference

Duality.Editor Namespace


EditorHintRangeAttribute Constructor

EditorHintRangeAttribute Constructor
Overload List
 | Name | Description
Public method | EditorHintRangeAttribute(Int32, Int32) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Single, Single) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Int32, Int32, Int32, Int32) | Initializes a new instance of the EditorHintRangeAttribute class
Public method | EditorHintRangeAttribute(Single, Single, Single, Single) | Initializes a new instance of the EditorHintRangeAttribute class
Top
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute Constructor (Int32, Int32)

EditorHintRangeAttribute Constructor (Int32, Int32)
Initializes a new instance of the EditorHintRangeAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintRangeAttribute(
    int min,
    int max
)

Parameters

min
Type: SystemInt32
max
Type: SystemInt32
See Also

Reference

EditorHintRangeAttribute Class
EditorHintRangeAttribute Overload
Duality.Editor Namespace


EditorHintRangeAttribute Constructor (Single, Single)

EditorHintRangeAttribute Constructor (Single, Single)
Initializes a new instance of the EditorHintRangeAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintRangeAttribute(
    float min,
    float max
)

Parameters

min
Type: SystemSingle
max
Type: SystemSingle
See Also

Reference

EditorHintRangeAttribute Class
EditorHintRangeAttribute Overload
Duality.Editor Namespace


EditorHintRangeAttribute Constructor (Int32, Int32, Int32, Int32)

EditorHintRangeAttribute Constructor (Int32, Int32, Int32, Int32)
Initializes a new instance of the EditorHintRangeAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintRangeAttribute(
    int limitMin,
    int limitMax,
    int reasonableMin,
    int reasonableMax
)

Parameters

limitMin
Type: SystemInt32
limitMax
Type: SystemInt32
reasonableMin
Type: SystemInt32
reasonableMax
Type: SystemInt32
See Also

Reference

EditorHintRangeAttribute Class
EditorHintRangeAttribute Overload
Duality.Editor Namespace


EditorHintRangeAttribute Constructor (Single, Single, Single, Single)

EditorHintRangeAttribute Constructor (Single, Single, Single, Single)
Initializes a new instance of the EditorHintRangeAttribute class

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public EditorHintRangeAttribute(
    float limitMin,
    float limitMax,
    float reasonableMin,
    float reasonableMax
)

Parameters

limitMin
Type: SystemSingle
limitMax
Type: SystemSingle
reasonableMin
Type: SystemSingle
reasonableMax
Type: SystemSingle
See Also

Reference

EditorHintRangeAttribute Class
EditorHintRangeAttribute Overload
Duality.Editor Namespace


EditorHintRangeAttribute Properties

EditorHintRangeAttribute Properties

The EditorHintRangeAttribute type exposes the following members.

Properties
 | Name | Description
Public property | LimitMaximum | [GET] The members limiting maximum value.
Public property | LimitMinimum | [GET] The members limiting minimum value.
Public property | ReasonableMaximum | [GET] The members reasonable (non-limiting) maximum value.
Public property | ReasonableMinimum | [GET] The members reasonable (non-limiting) minimum value.
Top
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute.LimitMaximum Property

EditorHintRangeAttributeLimitMaximum Property
[GET] The members limiting maximum value.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public decimal LimitMaximum { get; }

Property Value

Type: Decimal
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute.LimitMinimum Property

EditorHintRangeAttributeLimitMinimum Property
[GET] The members limiting minimum value.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public decimal LimitMinimum { get; }

Property Value

Type: Decimal
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute.ReasonableMaximum Property

EditorHintRangeAttributeReasonableMaximum Property
[GET] The members reasonable (non-limiting) maximum value.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public decimal ReasonableMaximum { get; }

Property Value

Type: Decimal
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


EditorHintRangeAttribute.ReasonableMinimum Property

EditorHintRangeAttributeReasonableMinimum Property
[GET] The members reasonable (non-limiting) minimum value.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public decimal ReasonableMinimum { get; }

Property Value

Type: Decimal
See Also

Reference

EditorHintRangeAttribute Class
Duality.Editor Namespace


MemberFlags Enumeration

MemberFlags Enumeration
Some general flags for Type members that indicate preferred editor behaviour.

Namespace: Duality.Editor
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum MemberFlags
Members
Member name | Value | Description
None | 0 | No flags set.
ForceWriteback | 1 | When editing the Properties or Fields value, a final set operation is requested to finish editing.
Invisible | 2 | The member is considered invisible. Will override visibility rules derived from reflection.
ReadOnly | 4 | The member is considered read-only, even if writing is possible via reflection.
AffectsOthers | 8 | Indicates that editing the member may have an effect on any other member of the current object.
Visible | 16 | The member is considered visible. Will override visibility rules derived from reflection.
See Also

Reference

Duality.Editor Namespace


Duality.Editor.AssetManagement Namespace

Duality.Editor.AssetManagement Namespace
Classes
 | Class | Description
Public class | AssetInfo | Provides information on the way a Resource should be treated during Asset import operations in the editor. This information should not be considered to be available at runtime or after deploying a game without editor support.


AssetInfo Class

AssetInfo Class
Provides information on the way a Resource should be treated during Asset import operations in the editor. This information should not be considered to be available at runtime or after deploying a game without editor support.
Inheritance Hierarchy
SystemObject
Duality.Editor.AssetManagementAssetInfo

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AssetInfo

The AssetInfo type exposes the following members.

Constructors
 | Name | Description
Public method | AssetInfo | Initializes a new instance of the AssetInfo class
Top
Properties
 | Name | Description
Public property | CustomData | [GET / SET] A collection of key-value pairs that can be used to attach custom asset data to the asset info of a Resource. This data can be used by importers and exporters to persistently store parameters and user configuration regarding import and export opreations of this Resource.
Public property | ImporterId | [GET / SET] The ID of the Asset Importer that was used to import this Asset. If set, it will be automatically used for Re-Import operations.
Public property | NameHint | [GET / SET] For runtime-only Resources that haven't been saved or located anywhere, this property provides a hint on how to name the Resource later. This property is considered temporary and won't be serialized.
Public property | SourceFileHint | [GET / SET] When set, this array provides a hint to the AssetManagement system which source files were used to create this Resource during the most recent import operation. The paths are relative to the mapped media source directory of the Resource and can use the {Name} variable to keep paths invariant to move and rename operations.
Top
See Also

Reference

Duality.Editor.AssetManagement Namespace


AssetInfo Constructor

AssetInfo Constructor
Initializes a new instance of the AssetInfo class

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AssetInfo()
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


AssetInfo Properties

AssetInfo Properties

The AssetInfo type exposes the following members.

Properties
 | Name | Description
Public property | CustomData | [GET / SET] A collection of key-value pairs that can be used to attach custom asset data to the asset info of a Resource. This data can be used by importers and exporters to persistently store parameters and user configuration regarding import and export opreations of this Resource.
Public property | ImporterId | [GET / SET] The ID of the Asset Importer that was used to import this Asset. If set, it will be automatically used for Re-Import operations.
Public property | NameHint | [GET / SET] For runtime-only Resources that haven't been saved or located anywhere, this property provides a hint on how to name the Resource later. This property is considered temporary and won't be serialized.
Public property | SourceFileHint | [GET / SET] When set, this array provides a hint to the AssetManagement system which source files were used to create this Resource during the most recent import operation. The paths are relative to the mapped media source directory of the Resource and can use the {Name} variable to keep paths invariant to move and rename operations.
Top
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


AssetInfo.CustomData Property

AssetInfoCustomData Property
[GET / SET] A collection of key-value pairs that can be used to attach custom asset data to the asset info of a Resource. This data can be used by importers and exporters to persistently store parameters and user configuration regarding import and export opreations of this Resource.

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Dictionary<string, Object> CustomData { get; set; }

Property Value

Type: Dictionary String, Object
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


AssetInfo.ImporterId Property

AssetInfoImporterId Property
[GET / SET] The ID of the Asset Importer that was used to import this Asset. If set, it will be automatically used for Re-Import operations.

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string ImporterId { get; set; }

Property Value

Type: String
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


AssetInfo.NameHint Property

AssetInfoNameHint Property
[GET / SET] For runtime-only Resources that haven't been saved or located anywhere, this property provides a hint on how to name the Resource later. This property is considered temporary and won't be serialized.

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string NameHint { get; set; }

Property Value

Type: String
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


AssetInfo.SourceFileHint Property

AssetInfoSourceFileHint Property
[GET / SET] When set, this array provides a hint to the AssetManagement system which source files were used to create this Resource during the most recent import operation. The paths are relative to the mapped media source directory of the Resource and can use the {Name} variable to keep paths invariant to move and rename operations.

Namespace: Duality.Editor.AssetManagement
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string[] SourceFileHint { get; set; }

Property Value

Type: String
See Also

Reference

AssetInfo Class
Duality.Editor.AssetManagement Namespace


Duality.Input Namespace

Duality.Input Namespace
Classes
 | Class | Description
Public class | GamepadAxisEventArgs |
Public class | GamepadButtonEventArgs |
Public class | GamepadInput | Provides access to gamepad user input.
Public class | GamepadInputCollection | Provides access to a set of GamepadInputs.
Public class | JoystickAxisEventArgs |
Public class | JoystickButtonEventArgs |
Public class | JoystickHatEventArgs |
Public class | JoystickInput | Provides access to extended user input such as joysticks or gamepads.
Public class | JoystickInputCollection | Provides access to a set of JoystickInputs.
Public class | KeyboardInput | Provides access to user keyboard input.
Public class | KeyboardKeyEventArgs |
Public class | MouseButtonEventArgs |
Public class | MouseEventArgs |
Public class | MouseInput | Provides access to user mouse input.
Public class | MouseMoveEventArgs |
Public class | MouseWheelEventArgs |
Public class | UserInputCollectionTInput, TSource | Provides access to a named set of user input devices.
Public class | UserInputEventArgs |
Interfaces
 | Interface | Description
Public interface | IGamepadInputSource | Describes a source of gamepad user input. This is usually an input device.
Public interface | IJoystickInputSource | Describes a source of extended user input such as joysticks or gamepads. This is usually an input device.
Public interface | IKeyboardInputSource | Describes a source of user keyboard input. This is usually an input device.
Public interface | IMouseInputSource | Describes a source of user mouse input. This is usually an input device.
Public interface | IUserInput |
Public interface | IUserInputSource | Base interface for describing a source of user input.
Enumerations
 | Enumeration | Description
Public enumeration | GamepadAxis |
Public enumeration | JoystickAxis |
Public enumeration | JoystickButton |
Public enumeration | JoystickHat |
Public enumeration | JoystickHatPosition |
Public enumeration | Key | Each enum entry represents a physical key location on a keyboard. These are not virtual key codes, but instead correspond to scancodes and thus should be thought of as position indicators of a pressed key, rather than a description of the letter that is printed on it. In naming the enum entries, a US / Ascii / QWERTY keyboard is assumed as a reference.
Public enumeration | MouseButton |


GamepadAxis Enumeration

GamepadAxis Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum GamepadAxis
Members
Member name | Value | Description
LeftTrigger | 0 |
LeftThumbstickX | 1 |
LeftThumbstickY | 2 |
RightTrigger | 3 |
RightThumbstickX | 4 |
RightThumbstickY | 5 |
Last | 5 |
See Also

Reference

Duality.Input Namespace


GamepadAxisEventArgs Class

GamepadAxisEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputGamepadAxisEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GamepadAxisEventArgs : UserInputEventArgs

The GamepadAxisEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | GamepadAxisEventArgs | Initializes a new instance of the GamepadAxisEventArgs class
Top
Properties
 | Name | Description
Public property | Axis |
Public property | Delta |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Value |
Top
See Also

Reference

Duality.Input Namespace


GamepadAxisEventArgs Constructor

GamepadAxisEventArgs Constructor
Initializes a new instance of the GamepadAxisEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GamepadAxisEventArgs(
    GamepadInput inputChannel,
    GamepadAxis axis,
    float axisValue,
    float axisDelta
)

Parameters

inputChannel
Type: Duality.InputGamepadInput
axis
Type: Duality.InputGamepadAxis
axisValue
Type: SystemSingle
axisDelta
Type: SystemSingle
See Also

Reference

GamepadAxisEventArgs Class
Duality.Input Namespace


GamepadAxisEventArgs Properties

GamepadAxisEventArgs Properties

The GamepadAxisEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Axis |
Public property | Delta |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Value |
Top
See Also

Reference

GamepadAxisEventArgs Class
Duality.Input Namespace


GamepadAxisEventArgs.Axis Property

GamepadAxisEventArgsAxis Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GamepadAxis Axis { get; }

Property Value

Type: GamepadAxis
See Also

Reference

GamepadAxisEventArgs Class
Duality.Input Namespace


GamepadAxisEventArgs.Delta Property

GamepadAxisEventArgsDelta Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Delta { get; }

Property Value

Type: Single
See Also

Reference

GamepadAxisEventArgs Class
Duality.Input Namespace


GamepadAxisEventArgs.Value Property

GamepadAxisEventArgsValue Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Value { get; }

Property Value

Type: Single
See Also

Reference

GamepadAxisEventArgs Class
Duality.Input Namespace


GamepadButtonEventArgs Class

GamepadButtonEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputGamepadButtonEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GamepadButtonEventArgs : UserInputEventArgs

The GamepadButtonEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | GamepadButtonEventArgs | Initializes a new instance of the GamepadButtonEventArgs class
Top
Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Pressed |
Top
See Also

Reference

Duality.Input Namespace


GamepadButtonEventArgs Constructor

GamepadButtonEventArgs Constructor
Initializes a new instance of the GamepadButtonEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GamepadButtonEventArgs(
    GamepadInput inputChannel,
    GamepadButton button,
    bool pressed
)

Parameters

inputChannel
Type: Duality.InputGamepadInput
button
Type: DualityGamepadButton
pressed
Type: SystemBoolean
See Also

Reference

GamepadButtonEventArgs Class
Duality.Input Namespace


GamepadButtonEventArgs Properties

GamepadButtonEventArgs Properties

The GamepadButtonEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Pressed |
Top
See Also

Reference

GamepadButtonEventArgs Class
Duality.Input Namespace


GamepadButtonEventArgs.Button Property

GamepadButtonEventArgsButton Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GamepadButton Button { get; }

Property Value

Type: GamepadButton
See Also

Reference

GamepadButtonEventArgs Class
Duality.Input Namespace


GamepadButtonEventArgs.Pressed Property

GamepadButtonEventArgsPressed Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Pressed { get; }

Property Value

Type: Boolean
See Also

Reference

GamepadButtonEventArgs Class
Duality.Input Namespace


GamepadInput Class

GamepadInput Class
Provides access to gamepad user input.
Inheritance Hierarchy
SystemObject
Duality.InputGamepadInput

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class GamepadInput : IUserInput

The GamepadInput type exposes the following members.

Methods
 | Name | Description
Public method | AxisSpeed | Returns the specified axis value change since last frame.
Public method | AxisValue | Returns the specified axis value.
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Public method | SetVibration | Sets the gamepads current vibration values.
Top
Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | DPad | [GET] The gamepads DPad state, expressed as a directional vector.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis current value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Public property | LeftThumbstick | [GET] The left thumbsticks current value.
Public property | LeftThumbstickSpeed | [GET] The left thumbsticks movement speed.
Public property | LeftTrigger | [GET] The left triggers current value.
Public property | LeftTriggerSpeed | [GET] The left triggers movement speed.
Public property | RightThumbstick | [GET] The right thumbsticks current value.
Public property | RightThumbstickSpeed | [GET] The right thumbsticks current movement speed.
Public property | RightTrigger | [GET] The right triggers current value.
Public property | RightTriggerSpeed | [GET] The right triggers movement speed.
Public property | Source | [GET / SET] The gamepad inputs data source.
Top
Events
 | Name | Description
Public event | BecomesAvailable | Fired when the joystick becomes available to Duality.
Public event | ButtonDown | Fired once when a device button is pressed.
Public event | ButtonUp | Fired once when a device button is no longer pressed.
Public event | Move | Fired whenever a device axis changes its value.
Public event | NoLongerAvailable | Fired when the joystick is no longer available to Duality.
Top
See Also

Reference

Duality.Input Namespace


GamepadInput Methods

GamepadInput Methods

The GamepadInput type exposes the following members.

Methods
 | Name | Description
Public method | AxisSpeed | Returns the specified axis value change since last frame.
Public method | AxisValue | Returns the specified axis value.
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Public method | SetVibration | Sets the gamepads current vibration values.
Top
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.AxisSpeed Method

GamepadInputAxisSpeed Method
Returns the specified axis value change since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AxisSpeed(
    GamepadAxis axis
)

Parameters

axis
Type: Duality.InputGamepadAxis

Return Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.AxisValue Method

GamepadInputAxisValue Method
Returns the specified axis value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AxisValue(
    GamepadAxis axis
)

Parameters

axis
Type: Duality.InputGamepadAxis

Return Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.ButtonHit Method

GamepadInputButtonHit Method
Returns whether the specified button was hit this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonHit(
    GamepadButton button
)

Parameters

button
Type: DualityGamepadButton

Return Value

Type: Boolean
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.ButtonPressed Method

GamepadInputButtonPressed Method
Returns whether the specified button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonPressed(
    GamepadButton button
)

Parameters

button
Type: DualityGamepadButton

Return Value

Type: Boolean
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.ButtonReleased Method

GamepadInputButtonReleased Method
Returns whether the specified button was released this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonReleased(
    GamepadButton button
)

Parameters

button
Type: DualityGamepadButton

Return Value

Type: Boolean
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.SetVibration Method

GamepadInputSetVibration Method
Sets the gamepads current vibration values.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetVibration(
    float left,
    float right
)

Parameters

left
Type: SystemSingle
Left vibration between 0.0 and 1.0
right
Type: SystemSingle
Right vibration between 0.0 and 1.0
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput Properties

GamepadInput Properties

The GamepadInput type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | DPad | [GET] The gamepads DPad state, expressed as a directional vector.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis current value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Public property | LeftThumbstick | [GET] The left thumbsticks current value.
Public property | LeftThumbstickSpeed | [GET] The left thumbsticks movement speed.
Public property | LeftTrigger | [GET] The left triggers current value.
Public property | LeftTriggerSpeed | [GET] The left triggers movement speed.
Public property | RightThumbstick | [GET] The right thumbsticks current value.
Public property | RightThumbstickSpeed | [GET] The right thumbsticks current movement speed.
Public property | RightTrigger | [GET] The right triggers current value.
Public property | RightTriggerSpeed | [GET] The right triggers movement speed.
Public property | Source | [GET / SET] The gamepad inputs data source.
Top
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.Description Property

GamepadInputDescription Property
[GET] A string containing a unique description for this instance.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Description { get; }

Property Value

Type: String

Implements

IUserInputDescription
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.DPad Property

GamepadInputDPad Property
[GET] The gamepads DPad state, expressed as a directional vector.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 DPad { get; }

Property Value

Type: Vector2
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.IsAvailable Property

GamepadInputIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAvailable { get; }

Property Value

Type: Boolean

Implements

IUserInputIsAvailable
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.Item Property

GamepadInputItem Property
Overload List
 | Name | Description
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis current value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Top
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.Item Property (GamepadAxis)

GamepadInputItem Property (GamepadAxis)
[GET] Returns the specified gamepad axis current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float this[
    GamepadAxis axis
] { get; }

Parameters

axis
Type: Duality.InputGamepadAxis

Return Value

Type: Single
See Also

Reference

GamepadInput Class
Item Overload
Duality.Input Namespace


GamepadInput.Item Property (GamepadButton)

GamepadInputItem Property (GamepadButton)
[GET] Returns whether the specified gamepad button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool this[
    GamepadButton button
] { get; }

Parameters

button
Type: DualityGamepadButton

Return Value

Type: Boolean
See Also

Reference

GamepadInput Class
Item Overload
Duality.Input Namespace


GamepadInput.LeftThumbstick Property

GamepadInputLeftThumbstick Property
[GET] The left thumbsticks current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LeftThumbstick { get; }

Property Value

Type: Vector2
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.LeftThumbstickSpeed Property

GamepadInputLeftThumbstickSpeed Property
[GET] The left thumbsticks movement speed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 LeftThumbstickSpeed { get; }

Property Value

Type: Vector2
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.LeftTrigger Property

GamepadInputLeftTrigger Property
[GET] The left triggers current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LeftTrigger { get; }

Property Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.LeftTriggerSpeed Property

GamepadInputLeftTriggerSpeed Property
[GET] The left triggers movement speed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LeftTriggerSpeed { get; }

Property Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.RightThumbstick Property

GamepadInputRightThumbstick Property
[GET] The right thumbsticks current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 RightThumbstick { get; }

Property Value

Type: Vector2
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.RightThumbstickSpeed Property

GamepadInputRightThumbstickSpeed Property
[GET] The right thumbsticks current movement speed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 RightThumbstickSpeed { get; }

Property Value

Type: Vector2
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.RightTrigger Property

GamepadInputRightTrigger Property
[GET] The right triggers current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RightTrigger { get; }

Property Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.RightTriggerSpeed Property

GamepadInputRightTriggerSpeed Property
[GET] The right triggers movement speed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float RightTriggerSpeed { get; }

Property Value

Type: Single
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.Source Property

GamepadInputSource Property
[GET / SET] The gamepad inputs data source.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IGamepadInputSource Source { get; set; }

Property Value

Type: IGamepadInputSource
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput Events

GamepadInput Events

The GamepadInput type exposes the following members.

Events
 | Name | Description
Public event | BecomesAvailable | Fired when the joystick becomes available to Duality.
Public event | ButtonDown | Fired once when a device button is pressed.
Public event | ButtonUp | Fired once when a device button is no longer pressed.
Public event | Move | Fired whenever a device axis changes its value.
Public event | NoLongerAvailable | Fired when the joystick is no longer available to Duality.
Top
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.BecomesAvailable Event

GamepadInputBecomesAvailable Event
Fired when the joystick becomes available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler BecomesAvailable

Value

Type: SystemEventHandler

Implements

IUserInputBecomesAvailable
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.ButtonDown Event

GamepadInputButtonDown Event
Fired once when a device button is pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GamepadButtonEventArgs> ButtonDown

Value

Type: SystemEventHandler GamepadButtonEventArgs
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.ButtonUp Event

GamepadInputButtonUp Event
Fired once when a device button is no longer pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GamepadButtonEventArgs> ButtonUp

Value

Type: SystemEventHandler GamepadButtonEventArgs
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.Move Event

GamepadInputMove Event
Fired whenever a device axis changes its value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<GamepadAxisEventArgs> Move

Value

Type: SystemEventHandler GamepadAxisEventArgs
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInput.NoLongerAvailable Event

GamepadInputNoLongerAvailable Event
Fired when the joystick is no longer available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler NoLongerAvailable

Value

Type: SystemEventHandler

Implements

IUserInputNoLongerAvailable
See Also

Reference

GamepadInput Class
Duality.Input Namespace


GamepadInputCollection Class

GamepadInputCollection Class
Provides access to a set of GamepadInputs.
Inheritance Hierarchy
SystemObject
Duality.InputUserInputCollection GamepadInput, IGamepadInputSource
Duality.InputGamepadInputCollection

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class GamepadInputCollection : UserInputCollection<GamepadInput, IGamepadInputSource>

The GamepadInputCollection type exposes the following members.

Constructors
 | Name | Description
Public method | GamepadInputCollection | Initializes a new instance of the GamepadInputCollection class
Top
Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | AddSource(TSource) | Adds a new user input source. (Inherited from UserInputCollectionTInput, TSource.)
Public method | ClearSources | Removes all user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | Contains | Returns whether a certain user input is known. (Inherited from UserInputCollectionTInput, TSource.)
Public method | CopyTo | Copies all known user inputs to the specified array. (Inherited from UserInputCollectionTInput, TSource.)
Protected method | CreateDummyInput | (Overrides UserInputCollectionTInput, TSourceCreateDummyInput.)
Protected method | CreateInput | (Overrides UserInputCollectionTInput, TSourceCreateInput(TSource).)
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs. (Inherited from UserInputCollectionTInput, TSource.)
Public method | IndexOf | Returns the index of a specific user input. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Top
Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemInt32 | [GET] Returns a specific input by index. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemString | [GET] Returns a specific input by its Description. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

Duality.Input Namespace


GamepadInputCollection Constructor

GamepadInputCollection Constructor
Initializes a new instance of the GamepadInputCollection class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GamepadInputCollection()
See Also

Reference

GamepadInputCollection Class
Duality.Input Namespace


GamepadInputCollection Methods

GamepadInputCollection Methods

The GamepadInputCollection type exposes the following members.

Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | AddSource(TSource) | Adds a new user input source. (Inherited from UserInputCollectionTInput, TSource.)
Public method | ClearSources | Removes all user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | Contains | Returns whether a certain user input is known. (Inherited from UserInputCollectionTInput, TSource.)
Public method | CopyTo | Copies all known user inputs to the specified array. (Inherited from UserInputCollectionTInput, TSource.)
Protected method | CreateDummyInput | (Overrides UserInputCollectionTInput, TSourceCreateDummyInput.)
Protected method | CreateInput | (Overrides UserInputCollectionTInput, TSourceCreateInput(TSource).)
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs. (Inherited from UserInputCollectionTInput, TSource.)
Public method | IndexOf | Returns the index of a specific user input. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

GamepadInputCollection Class
Duality.Input Namespace


GamepadInputCollection.CreateDummyInput Method

GamepadInputCollectionCreateDummyInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override GamepadInput CreateDummyInput()

Return Value

Type: GamepadInput
See Also

Reference

GamepadInputCollection Class
Duality.Input Namespace


GamepadInputCollection.CreateInput Method

GamepadInputCollectionCreateInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override GamepadInput CreateInput(
    IGamepadInputSource source
)

Parameters

source
Type: Duality.InputIGamepadInputSource

Return Value

Type: GamepadInput
See Also

Reference

GamepadInputCollection Class
Duality.Input Namespace


GamepadInputCollection Properties

GamepadInputCollection Properties

The GamepadInputCollection type exposes the following members.

Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemInt32 | [GET] Returns a specific input by index. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemString | [GET] Returns a specific input by its Description. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

GamepadInputCollection Class
Duality.Input Namespace


IGamepadInputSource Interface

IGamepadInputSource Interface
Describes a source of gamepad user input. This is usually an input device.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IGamepadInputSource : IUserInputSource

The IGamepadInputSource type exposes the following members.

Methods
 | Name | Description
Public method | SetVibration | Sets the gamepads current vibration values.
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Top
See Also

Reference

Duality.Input Namespace


IGamepadInputSource Methods

IGamepadInputSource Methods

The IGamepadInputSource type exposes the following members.

Methods
 | Name | Description
Public method | SetVibration | Sets the gamepads current vibration values.
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
See Also

Reference

IGamepadInputSource Interface
Duality.Input Namespace


IGamepadInputSource.SetVibration Method

IGamepadInputSourceSetVibration Method
Sets the gamepads current vibration values.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void SetVibration(
    float left,
    float right
)

Parameters

left
Type: SystemSingle
Left vibration between 0.0 and 1.0
right
Type: SystemSingle
Right vibration between 0.0 and 1.0
See Also

Reference

IGamepadInputSource Interface
Duality.Input Namespace


IGamepadInputSource Properties

IGamepadInputSource Properties

The IGamepadInputSource type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Top
See Also

Reference

IGamepadInputSource Interface
Duality.Input Namespace


IGamepadInputSource.Item Property

IGamepadInputSourceItem Property
Overload List
 | Name | Description
Public property | ItemGamepadAxis | [GET] Returns the specified gamepad axis value.
Public property | ItemGamepadButton | [GET] Returns whether the specified gamepad button is currently pressed.
Top
See Also

Reference

IGamepadInputSource Interface
Duality.Input Namespace


IGamepadInputSource.Item Property (GamepadAxis)

IGamepadInputSourceItem Property (GamepadAxis)
[GET] Returns the specified gamepad axis value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float this[
    GamepadAxis axis
] { get; }

Parameters

axis
Type: Duality.InputGamepadAxis

Return Value

Type: Single
See Also

Reference

IGamepadInputSource Interface
Item Overload
Duality.Input Namespace


IGamepadInputSource.Item Property (GamepadButton)

IGamepadInputSourceItem Property (GamepadButton)
[GET] Returns whether the specified gamepad button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool this[
    GamepadButton button
] { get; }

Parameters

button
Type: DualityGamepadButton

Return Value

Type: Boolean
See Also

Reference

IGamepadInputSource Interface
Item Overload
Duality.Input Namespace


IJoystickInputSource Interface

IJoystickInputSource Interface
Describes a source of extended user input such as joysticks or gamepads. This is usually an input device.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IJoystickInputSource : IUserInputSource

The IJoystickInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
Properties
 | Name | Description
Public property | AxisCount | [GET] Returns the number of axes.
Public property | ButtonCount | [GET] Returns the number of buttons.
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | HatCount | [GET] Returns the number of hats.
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Top
See Also

Reference

Duality.Input Namespace


IJoystickInputSource Methods

IJoystickInputSource Methods

The IJoystickInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource Properties

IJoystickInputSource Properties

The IJoystickInputSource type exposes the following members.

Properties
 | Name | Description
Public property | AxisCount | [GET] Returns the number of axes.
Public property | ButtonCount | [GET] Returns the number of buttons.
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | HatCount | [GET] Returns the number of hats.
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Top
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource.AxisCount Property

IJoystickInputSourceAxisCount Property
[GET] Returns the number of axes.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int AxisCount { get; }

Property Value

Type: Int32
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource.ButtonCount Property

IJoystickInputSourceButtonCount Property
[GET] Returns the number of buttons.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int ButtonCount { get; }

Property Value

Type: Int32
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource.HatCount Property

IJoystickInputSourceHatCount Property
[GET] Returns the number of hats.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int HatCount { get; }

Property Value

Type: Int32
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource.Item Property

IJoystickInputSourceItem Property
Overload List
 | Name | Description
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Top
See Also

Reference

IJoystickInputSource Interface
Duality.Input Namespace


IJoystickInputSource.Item Property (JoystickAxis)

IJoystickInputSourceItem Property (JoystickAxis)
[GET] Returns the specified device axis current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float this[
    JoystickAxis axis
] { get; }

Parameters

axis
Type: Duality.InputJoystickAxis

Return Value

Type: Single
See Also

Reference

IJoystickInputSource Interface
Item Overload
Duality.Input Namespace


IJoystickInputSource.Item Property (JoystickButton)

IJoystickInputSourceItem Property (JoystickButton)
[GET] Returns whether the specified device button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool this[
    JoystickButton button
] { get; }

Parameters

button
Type: Duality.InputJoystickButton

Return Value

Type: Boolean
See Also

Reference

IJoystickInputSource Interface
Item Overload
Duality.Input Namespace


IJoystickInputSource.Item Property (JoystickHat)

IJoystickInputSourceItem Property (JoystickHat)
[GET] Returns the current position of the specified joystick hat.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
JoystickHatPosition this[
    JoystickHat hat
] { get; }

Parameters

hat
Type: Duality.InputJoystickHat

Return Value

Type: JoystickHatPosition
See Also

Reference

IJoystickInputSource Interface
Item Overload
Duality.Input Namespace


IKeyboardInputSource Interface

IKeyboardInputSource Interface
Describes a source of user keyboard input. This is usually an input device.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IKeyboardInputSource : IUserInputSource

The IKeyboardInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
Properties
 | Name | Description
Public property | CharInput | [GET] Returns the concatenated character input that was typed since the last input update.
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | Item | [GET] Returns whether a specific key is currently pressed.
Top
See Also

Reference

Duality.Input Namespace


IKeyboardInputSource Methods

IKeyboardInputSource Methods

The IKeyboardInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
See Also

Reference

IKeyboardInputSource Interface
Duality.Input Namespace


IKeyboardInputSource Properties

IKeyboardInputSource Properties

The IKeyboardInputSource type exposes the following members.

Properties
 | Name | Description
Public property | CharInput | [GET] Returns the concatenated character input that was typed since the last input update.
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | Item | [GET] Returns whether a specific key is currently pressed.
Top
See Also

Reference

IKeyboardInputSource Interface
Duality.Input Namespace


IKeyboardInputSource.CharInput Property

IKeyboardInputSourceCharInput Property
[GET] Returns the concatenated character input that was typed since the last input update.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string CharInput { get; }

Property Value

Type: String
See Also

Reference

IKeyboardInputSource Interface
Duality.Input Namespace


IKeyboardInputSource.Item Property

IKeyboardInputSourceItem Property
[GET] Returns whether a specific key is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool this[
    Key key
] { get; }

Parameters

key
Type: Duality.InputKey

Return Value

Type: Boolean
See Also

Reference

IKeyboardInputSource Interface
Duality.Input Namespace


IMouseInputSource Interface

IMouseInputSource Interface
Describes a source of user mouse input. This is usually an input device.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IMouseInputSource : IUserInputSource

The IMouseInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | Item | [GET] Returns whether a specific MouseButton is currently pressed.
Public property | Wheel | [GET] The current mouse wheel value
Public property | X | [GET / SET] The current viewport-local cursor X position.
Public property | Y | [GET / SET] The current viewport-local cursor Y position.
Top
See Also

Reference

Duality.Input Namespace


IMouseInputSource Methods

IMouseInputSource Methods

The IMouseInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state. (Inherited from IUserInputSource.)
Top
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IMouseInputSource Properties

IMouseInputSource Properties

The IMouseInputSource type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance. (Inherited from IUserInputSource.)
Public property | IsAvailable | [GET] Returns whether this input is currently available. (Inherited from IUserInputSource.)
Public property | Item | [GET] Returns whether a specific MouseButton is currently pressed.
Public property | Wheel | [GET] The current mouse wheel value
Public property | X | [GET / SET] The current viewport-local cursor X position.
Public property | Y | [GET / SET] The current viewport-local cursor Y position.
Top
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IMouseInputSource.Item Property

IMouseInputSourceItem Property
[GET] Returns whether a specific MouseButton is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool this[
    MouseButton btn
] { get; }

Parameters

btn
Type: Duality.InputMouseButton

Property Value

Type: Boolean
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IMouseInputSource.Wheel Property

IMouseInputSourceWheel Property
[GET] The current mouse wheel value

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
float Wheel { get; }

Property Value

Type: Single
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IMouseInputSource.X Property

IMouseInputSourceX Property
[GET / SET] The current viewport-local cursor X position.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int X { get; set; }

Property Value

Type: Int32
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IMouseInputSource.Y Property

IMouseInputSourceY Property
[GET / SET] The current viewport-local cursor Y position.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Y { get; set; }

Property Value

Type: Int32
See Also

Reference

IMouseInputSource Interface
Duality.Input Namespace


IUserInput Interface

IUserInput Interface

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IUserInput

The IUserInput type exposes the following members.

Methods
 | Name | Description
Public method | Update | Updates the inputs current state.
Top
Properties
 | Name | Description
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Source | [GET / SET] The source where this input derives its state from.
Top
Events
 | Name | Description
Public event | BecomesAvailable | Fired when the input becomes available to Duality.
Public event | NoLongerAvailable | Fired when the input is no longer available to Duality.
Top
See Also

Reference

Duality.Input Namespace


IUserInput Methods

IUserInput Methods

The IUserInput type exposes the following members.

Methods
 | Name | Description
Public method | Update | Updates the inputs current state.
Top
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.Update Method

IUserInputUpdate Method
Updates the inputs current state.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void Update()
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput Properties

IUserInput Properties

The IUserInput type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Source | [GET / SET] The source where this input derives its state from.
Top
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.Description Property

IUserInputDescription Property
[GET] A text description of this input.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Description { get; }

Property Value

Type: String
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.IsAvailable Property

IUserInputIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsAvailable { get; }

Property Value

Type: Boolean
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.Source Property

IUserInputSource Property
[GET / SET] The source where this input derives its state from.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IUserInputSource Source { get; set; }

Property Value

Type: IUserInputSource
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput Events

IUserInput Events

The IUserInput type exposes the following members.

Events
 | Name | Description
Public event | BecomesAvailable | Fired when the input becomes available to Duality.
Public event | NoLongerAvailable | Fired when the input is no longer available to Duality.
Top
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.BecomesAvailable Event

IUserInputBecomesAvailable Event
Fired when the input becomes available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
event EventHandler BecomesAvailable

Value

Type: SystemEventHandler
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInput.NoLongerAvailable Event

IUserInputNoLongerAvailable Event
Fired when the input is no longer available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
event EventHandler NoLongerAvailable

Value

Type: SystemEventHandler
See Also

Reference

IUserInput Interface
Duality.Input Namespace


IUserInputSource Interface

IUserInputSource Interface
Base interface for describing a source of user input.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IUserInputSource

The IUserInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state.
Top
Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Top
See Also

Reference

Duality.Input Namespace


IUserInputSource Methods

IUserInputSource Methods

The IUserInputSource type exposes the following members.

Methods
 | Name | Description
Public method | UpdateState | Updates the sources current state.
Top
See Also

Reference

IUserInputSource Interface
Duality.Input Namespace


IUserInputSource.UpdateState Method

IUserInputSourceUpdateState Method
Updates the sources current state.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void UpdateState()
See Also

Reference

IUserInputSource Interface
Duality.Input Namespace


IUserInputSource Properties

IUserInputSource Properties

The IUserInputSource type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Top
See Also

Reference

IUserInputSource Interface
Duality.Input Namespace


IUserInputSource.Description Property

IUserInputSourceDescription Property
[GET] A string containing a unique description for this instance.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string Description { get; }

Property Value

Type: String
See Also

Reference

IUserInputSource Interface
Duality.Input Namespace


IUserInputSource.IsAvailable Property

IUserInputSourceIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool IsAvailable { get; }

Property Value

Type: Boolean
See Also

Reference

IUserInputSource Interface
Duality.Input Namespace


JoystickAxis Enumeration

JoystickAxis Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum JoystickAxis
Members
Member name | Value | Description
Axis0 | 0 |
Axis1 | 1 |
Axis2 | 2 |
Axis3 | 3 |
Axis4 | 4 |
Axis5 | 5 |
Axis6 | 6 |
Axis7 | 7 |
Axis8 | 8 |
Axis9 | 9 |
Axis10 | 10 |
Axis11 | 11 |
Last | 11 |
See Also

Reference

Duality.Input Namespace


JoystickAxisEventArgs Class

JoystickAxisEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputJoystickAxisEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class JoystickAxisEventArgs : UserInputEventArgs

The JoystickAxisEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | JoystickAxisEventArgs | Initializes a new instance of the JoystickAxisEventArgs class
Top
Properties
 | Name | Description
Public property | Axis |
Public property | Delta |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Value |
Top
See Also

Reference

Duality.Input Namespace


JoystickAxisEventArgs Constructor

JoystickAxisEventArgs Constructor
Initializes a new instance of the JoystickAxisEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickAxisEventArgs(
    JoystickInput inputChannel,
    JoystickAxis axis,
    float axisValue,
    float axisDelta
)

Parameters

inputChannel
Type: Duality.InputJoystickInput
axis
Type: Duality.InputJoystickAxis
axisValue
Type: SystemSingle
axisDelta
Type: SystemSingle
See Also

Reference

JoystickAxisEventArgs Class
Duality.Input Namespace


JoystickAxisEventArgs Properties

JoystickAxisEventArgs Properties

The JoystickAxisEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Axis |
Public property | Delta |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Value |
Top
See Also

Reference

JoystickAxisEventArgs Class
Duality.Input Namespace


JoystickAxisEventArgs.Axis Property

JoystickAxisEventArgsAxis Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickAxis Axis { get; }

Property Value

Type: JoystickAxis
See Also

Reference

JoystickAxisEventArgs Class
Duality.Input Namespace


JoystickAxisEventArgs.Delta Property

JoystickAxisEventArgsDelta Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Delta { get; }

Property Value

Type: Single
See Also

Reference

JoystickAxisEventArgs Class
Duality.Input Namespace


JoystickAxisEventArgs.Value Property

JoystickAxisEventArgsValue Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Value { get; }

Property Value

Type: Single
See Also

Reference

JoystickAxisEventArgs Class
Duality.Input Namespace


JoystickButton Enumeration

JoystickButton Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum JoystickButton
Members
Member name | Value | Description
Button0 | 0 |
Button1 | 1 |
Button2 | 2 |
Button3 | 3 |
Button4 | 4 |
Button5 | 5 |
Button6 | 6 |
Button7 | 7 |
Button8 | 8 |
Button9 | 9 |
Button10 | 10 |
Button11 | 11 |
Button12 | 12 |
Button13 | 13 |
Button14 | 14 |
Button15 | 15 |
Button16 | 16 |
Button17 | 17 |
Button18 | 18 |
Button19 | 19 |
Button20 | 20 |
Button21 | 21 |
Button22 | 22 |
Button23 | 23 |
Button24 | 24 |
Button25 | 25 |
Button26 | 26 |
Button27 | 27 |
Button28 | 28 |
Button29 | 29 |
Button30 | 30 |
Button31 | 31 |
Last | 31 |
See Also

Reference

Duality.Input Namespace


JoystickButtonEventArgs Class

JoystickButtonEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputJoystickButtonEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class JoystickButtonEventArgs : UserInputEventArgs

The JoystickButtonEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | JoystickButtonEventArgs | Initializes a new instance of the JoystickButtonEventArgs class
Top
Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Pressed |
Top
See Also

Reference

Duality.Input Namespace


JoystickButtonEventArgs Constructor

JoystickButtonEventArgs Constructor
Initializes a new instance of the JoystickButtonEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickButtonEventArgs(
    JoystickInput inputChannel,
    JoystickButton button,
    bool pressed
)

Parameters

inputChannel
Type: Duality.InputJoystickInput
button
Type: Duality.InputJoystickButton
pressed
Type: SystemBoolean
See Also

Reference

JoystickButtonEventArgs Class
Duality.Input Namespace


JoystickButtonEventArgs Properties

JoystickButtonEventArgs Properties

The JoystickButtonEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Pressed |
Top
See Also

Reference

JoystickButtonEventArgs Class
Duality.Input Namespace


JoystickButtonEventArgs.Button Property

JoystickButtonEventArgsButton Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickButton Button { get; }

Property Value

Type: JoystickButton
See Also

Reference

JoystickButtonEventArgs Class
Duality.Input Namespace


JoystickButtonEventArgs.Pressed Property

JoystickButtonEventArgsPressed Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Pressed { get; }

Property Value

Type: Boolean
See Also

Reference

JoystickButtonEventArgs Class
Duality.Input Namespace


JoystickHat Enumeration

JoystickHat Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum JoystickHat
Members
Member name | Value | Description
Hat0 | 0 |
Hat1 | 1 |
Hat2 | 2 |
Hat3 | 3 |
Last | 3 |
See Also

Reference

Duality.Input Namespace


JoystickHatEventArgs Class

JoystickHatEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputJoystickHatEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class JoystickHatEventArgs : UserInputEventArgs

The JoystickHatEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | JoystickHatEventArgs | Initializes a new instance of the JoystickHatEventArgs class
Top
Properties
 | Name | Description
Public property | Hat |
Public property | HatPosition |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | LastHatPosition |
Top
See Also

Reference

Duality.Input Namespace


JoystickHatEventArgs Constructor

JoystickHatEventArgs Constructor
Initializes a new instance of the JoystickHatEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatEventArgs(
    JoystickInput inputChannel,
    JoystickHat hat,
    JoystickHatPosition hatPos,
    JoystickHatPosition lastHatPos
)

Parameters

inputChannel
Type: Duality.InputJoystickInput
hat
Type: Duality.InputJoystickHat
hatPos
Type: Duality.InputJoystickHatPosition
lastHatPos
Type: Duality.InputJoystickHatPosition
See Also

Reference

JoystickHatEventArgs Class
Duality.Input Namespace


JoystickHatEventArgs Properties

JoystickHatEventArgs Properties

The JoystickHatEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Hat |
Public property | HatPosition |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | LastHatPosition |
Top
See Also

Reference

JoystickHatEventArgs Class
Duality.Input Namespace


JoystickHatEventArgs.Hat Property

JoystickHatEventArgsHat Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHat Hat { get; }

Property Value

Type: JoystickHat
See Also

Reference

JoystickHatEventArgs Class
Duality.Input Namespace


JoystickHatEventArgs.HatPosition Property

JoystickHatEventArgsHatPosition Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition HatPosition { get; }

Property Value

Type: JoystickHatPosition
See Also

Reference

JoystickHatEventArgs Class
Duality.Input Namespace


JoystickHatEventArgs.LastHatPosition Property

JoystickHatEventArgsLastHatPosition Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition LastHatPosition { get; }

Property Value

Type: JoystickHatPosition
See Also

Reference

JoystickHatEventArgs Class
Duality.Input Namespace


JoystickHatPosition Enumeration

JoystickHatPosition Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum JoystickHatPosition
Members
Member name | Value | Description
Centered | 0 |
Up | 1 |
Right | 2 |
Down | 4 |
Left | 8 |
See Also

Reference

Duality.Input Namespace


JoystickInput Class

JoystickInput Class
Provides access to extended user input such as joysticks or gamepads.
Inheritance Hierarchy
SystemObject
Duality.InputJoystickInput

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class JoystickInput : IUserInput

The JoystickInput type exposes the following members.

Methods
 | Name | Description
Public method | AxisSpeed | Returns the specified axis value change since last frame.
Public method | AxisValue | Returns the specified axis value.
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Public method | HatHit | Returns all new hat displacement that occurred since last frame.
Public method | HatPosition | Returns the current position of the specified joystick hat.
Public method | HatReleased | Returns all old hat displacement that stopped since last frame.
Top
Properties
 | Name | Description
Public property | AxisCount | [GET] Returns the number of axes.
Public property | ButtonCount | [GET] Returns the number of buttons.
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | HatCount | [GET] Returns the number of joystick hats.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Public property | Source | [GET / SET] The extended user inputs data source.
Top
Events
 | Name | Description
Public event | AxisMove | Fired whenever a device axis changes its value.
Public event | BecomesAvailable | Fired when the joystick becomes available to Duality.
Public event | ButtonDown | Fired once when a device button is pressed.
Public event | ButtonUp | Fired once when a device button is no longer pressed.
Public event | HatMove | Fired whenever a joystick hat moves.
Public event | NoLongerAvailable | Fired when the joystick is no longer available to Duality.
Top
See Also

Reference

Duality.Input Namespace


JoystickInput Methods

JoystickInput Methods

The JoystickInput type exposes the following members.

Methods
 | Name | Description
Public method | AxisSpeed | Returns the specified axis value change since last frame.
Public method | AxisValue | Returns the specified axis value.
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Public method | HatHit | Returns all new hat displacement that occurred since last frame.
Public method | HatPosition | Returns the current position of the specified joystick hat.
Public method | HatReleased | Returns all old hat displacement that stopped since last frame.
Top
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.AxisSpeed Method

JoystickInputAxisSpeed Method
Returns the specified axis value change since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AxisSpeed(
    JoystickAxis axis
)

Parameters

axis
Type: Duality.InputJoystickAxis

Return Value

Type: Single
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.AxisValue Method

JoystickInputAxisValue Method
Returns the specified axis value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float AxisValue(
    JoystickAxis axis
)

Parameters

axis
Type: Duality.InputJoystickAxis

Return Value

Type: Single
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonHit Method

JoystickInputButtonHit Method
Returns whether the specified button was hit this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonHit(
    JoystickButton button
)

Parameters

button
Type: Duality.InputJoystickButton

Return Value

Type: Boolean
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonPressed Method

JoystickInputButtonPressed Method
Returns whether the specified button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonPressed(
    JoystickButton button
)

Parameters

button
Type: Duality.InputJoystickButton

Return Value

Type: Boolean
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonReleased Method

JoystickInputButtonReleased Method
Returns whether the specified button was released this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonReleased(
    JoystickButton button
)

Parameters

button
Type: Duality.InputJoystickButton

Return Value

Type: Boolean
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.HatHit Method

JoystickInputHatHit Method
Returns all new hat displacement that occurred since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition HatHit(
    JoystickHat hat
)

Parameters

hat
Type: Duality.InputJoystickHat

Return Value

Type: JoystickHatPosition
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.HatPosition Method

JoystickInputHatPosition Method
Returns the current position of the specified joystick hat.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition HatPosition(
    JoystickHat hat
)

Parameters

hat
Type: Duality.InputJoystickHat

Return Value

Type: JoystickHatPosition
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.HatReleased Method

JoystickInputHatReleased Method
Returns all old hat displacement that stopped since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition HatReleased(
    JoystickHat hat
)

Parameters

hat
Type: Duality.InputJoystickHat

Return Value

Type: JoystickHatPosition
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput Properties

JoystickInput Properties

The JoystickInput type exposes the following members.

Properties
 | Name | Description
Public property | AxisCount | [GET] Returns the number of axes.
Public property | ButtonCount | [GET] Returns the number of buttons.
Public property | Description | [GET] A string containing a unique description for this instance.
Public property | HatCount | [GET] Returns the number of joystick hats.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Public property | Source | [GET / SET] The extended user inputs data source.
Top
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.AxisCount Property

JoystickInputAxisCount Property
[GET] Returns the number of axes.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AxisCount { get; }

Property Value

Type: Int32
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonCount Property

JoystickInputButtonCount Property
[GET] Returns the number of buttons.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ButtonCount { get; }

Property Value

Type: Int32
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.Description Property

JoystickInputDescription Property
[GET] A string containing a unique description for this instance.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Description { get; }

Property Value

Type: String

Implements

IUserInputDescription
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.HatCount Property

JoystickInputHatCount Property
[GET] Returns the number of joystick hats.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int HatCount { get; }

Property Value

Type: Int32
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.IsAvailable Property

JoystickInputIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAvailable { get; }

Property Value

Type: Boolean

Implements

IUserInputIsAvailable
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.Item Property

JoystickInputItem Property
Overload List
 | Name | Description
Public property | ItemJoystickAxis | [GET] Returns the specified device axis current value.
Public property | ItemJoystickButton | [GET] Returns whether the specified device button is currently pressed.
Public property | ItemJoystickHat | [GET] Returns the current position of the specified joystick hat.
Top
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.Item Property (JoystickAxis)

JoystickInputItem Property (JoystickAxis)
[GET] Returns the specified device axis current value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float this[
    JoystickAxis axis
] { get; }

Parameters

axis
Type: Duality.InputJoystickAxis

Return Value

Type: Single
See Also

Reference

JoystickInput Class
Item Overload
Duality.Input Namespace


JoystickInput.Item Property (JoystickButton)

JoystickInputItem Property (JoystickButton)
[GET] Returns whether the specified device button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool this[
    JoystickButton button
] { get; }

Parameters

button
Type: Duality.InputJoystickButton

Return Value

Type: Boolean
See Also

Reference

JoystickInput Class
Item Overload
Duality.Input Namespace


JoystickInput.Item Property (JoystickHat)

JoystickInputItem Property (JoystickHat)
[GET] Returns the current position of the specified joystick hat.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickHatPosition this[
    JoystickHat hat
] { get; }

Parameters

hat
Type: Duality.InputJoystickHat

Return Value

Type: JoystickHatPosition
See Also

Reference

JoystickInput Class
Item Overload
Duality.Input Namespace


JoystickInput.Source Property

JoystickInputSource Property
[GET / SET] The extended user inputs data source.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IJoystickInputSource Source { get; set; }

Property Value

Type: IJoystickInputSource
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput Events

JoystickInput Events

The JoystickInput type exposes the following members.

Events
 | Name | Description
Public event | AxisMove | Fired whenever a device axis changes its value.
Public event | BecomesAvailable | Fired when the joystick becomes available to Duality.
Public event | ButtonDown | Fired once when a device button is pressed.
Public event | ButtonUp | Fired once when a device button is no longer pressed.
Public event | HatMove | Fired whenever a joystick hat moves.
Public event | NoLongerAvailable | Fired when the joystick is no longer available to Duality.
Top
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.AxisMove Event

JoystickInputAxisMove Event
Fired whenever a device axis changes its value.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<JoystickAxisEventArgs> AxisMove

Value

Type: SystemEventHandler JoystickAxisEventArgs
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.BecomesAvailable Event

JoystickInputBecomesAvailable Event
Fired when the joystick becomes available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler BecomesAvailable

Value

Type: SystemEventHandler

Implements

IUserInputBecomesAvailable
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonDown Event

JoystickInputButtonDown Event
Fired once when a device button is pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<JoystickButtonEventArgs> ButtonDown

Value

Type: SystemEventHandler JoystickButtonEventArgs
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.ButtonUp Event

JoystickInputButtonUp Event
Fired once when a device button is no longer pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<JoystickButtonEventArgs> ButtonUp

Value

Type: SystemEventHandler JoystickButtonEventArgs
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.HatMove Event

JoystickInputHatMove Event
Fired whenever a joystick hat moves.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<JoystickHatEventArgs> HatMove

Value

Type: SystemEventHandler JoystickHatEventArgs
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInput.NoLongerAvailable Event

JoystickInputNoLongerAvailable Event
Fired when the joystick is no longer available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler NoLongerAvailable

Value

Type: SystemEventHandler

Implements

IUserInputNoLongerAvailable
See Also

Reference

JoystickInput Class
Duality.Input Namespace


JoystickInputCollection Class

JoystickInputCollection Class
Provides access to a set of JoystickInputs.
Inheritance Hierarchy
SystemObject
Duality.InputUserInputCollection JoystickInput, IJoystickInputSource
Duality.InputJoystickInputCollection

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class JoystickInputCollection : UserInputCollection<JoystickInput, IJoystickInputSource>

The JoystickInputCollection type exposes the following members.

Constructors
 | Name | Description
Public method | JoystickInputCollection | Initializes a new instance of the JoystickInputCollection class
Top
Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | AddSource(TSource) | Adds a new user input source. (Inherited from UserInputCollectionTInput, TSource.)
Public method | ClearSources | Removes all user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | Contains | Returns whether a certain user input is known. (Inherited from UserInputCollectionTInput, TSource.)
Public method | CopyTo | Copies all known user inputs to the specified array. (Inherited from UserInputCollectionTInput, TSource.)
Protected method | CreateDummyInput | (Overrides UserInputCollectionTInput, TSourceCreateDummyInput.)
Protected method | CreateInput | (Overrides UserInputCollectionTInput, TSourceCreateInput(TSource).)
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs. (Inherited from UserInputCollectionTInput, TSource.)
Public method | IndexOf | Returns the index of a specific user input. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Top
Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemInt32 | [GET] Returns a specific input by index. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemString | [GET] Returns a specific input by its Description. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

Duality.Input Namespace


JoystickInputCollection Constructor

JoystickInputCollection Constructor
Initializes a new instance of the JoystickInputCollection class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public JoystickInputCollection()
See Also

Reference

JoystickInputCollection Class
Duality.Input Namespace


JoystickInputCollection Methods

JoystickInputCollection Methods

The JoystickInputCollection type exposes the following members.

Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | AddSource(TSource) | Adds a new user input source. (Inherited from UserInputCollectionTInput, TSource.)
Public method | ClearSources | Removes all user input sources. (Inherited from UserInputCollectionTInput, TSource.)
Public method | Contains | Returns whether a certain user input is known. (Inherited from UserInputCollectionTInput, TSource.)
Public method | CopyTo | Copies all known user inputs to the specified array. (Inherited from UserInputCollectionTInput, TSource.)
Protected method | CreateDummyInput | (Overrides UserInputCollectionTInput, TSourceCreateDummyInput.)
Protected method | CreateInput | (Overrides UserInputCollectionTInput, TSourceCreateInput(TSource).)
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs. (Inherited from UserInputCollectionTInput, TSource.)
Public method | IndexOf | Returns the index of a specific user input. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

JoystickInputCollection Class
Duality.Input Namespace


JoystickInputCollection.CreateDummyInput Method

JoystickInputCollectionCreateDummyInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override JoystickInput CreateDummyInput()

Return Value

Type: JoystickInput
See Also

Reference

JoystickInputCollection Class
Duality.Input Namespace


JoystickInputCollection.CreateInput Method

JoystickInputCollectionCreateInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override JoystickInput CreateInput(
    IJoystickInputSource source
)

Parameters

source
Type: Duality.InputIJoystickInputSource

Return Value

Type: JoystickInput
See Also

Reference

JoystickInputCollection Class
Duality.Input Namespace


JoystickInputCollection Properties

JoystickInputCollection Properties

The JoystickInputCollection type exposes the following members.

Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemInt32 | [GET] Returns a specific input by index. (Inherited from UserInputCollectionTInput, TSource.)
Public property | ItemString | [GET] Returns a specific input by its Description. (Inherited from UserInputCollectionTInput, TSource.)
Top
See Also

Reference

JoystickInputCollection Class
Duality.Input Namespace


Key Enumeration

Key Enumeration
Each enum entry represents a physical key location on a keyboard. These are not virtual key codes, but instead correspond to scancodes and thus should be thought of as position indicators of a pressed key, rather than a description of the letter that is printed on it. In naming the enum entries, a US / Ascii / QWERTY keyboard is assumed as a reference.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum Key
Members
Member name | Value | Description
Unknown | 0 |
ShiftLeft | 1 |
ShiftRight | 2 |
ControlLeft | 3 |
ControlRight | 4 |
AltLeft | 5 |
AltRight | 6 |
WinLeft | 7 |
WinRight | 8 |
Menu | 9 |
F1 | 10 |
F2 | 11 |
F3 | 12 |
F4 | 13 |
F5 | 14 |
F6 | 15 |
F7 | 16 |
F8 | 17 |
F9 | 18 |
F10 | 19 |
F11 | 20 |
F12 | 21 |
F13 | 22 |
F14 | 23 |
F15 | 24 |
F16 | 25 |
F17 | 26 |
F18 | 27 |
F19 | 28 |
F20 | 29 |
F21 | 30 |
F22 | 31 |
F23 | 32 |
F24 | 33 |
F25 | 34 |
F26 | 35 |
F27 | 36 |
F28 | 37 |
F29 | 38 |
F30 | 39 |
F31 | 40 |
F32 | 41 |
F33 | 42 |
F34 | 43 |
F35 | 44 |
Up | 45 |
Down | 46 |
Left | 47 |
Right | 48 |
Enter | 49 |
Escape | 50 |
Space | 51 |
Tab | 52 |
BackSpace | 53 |
Insert | 54 |
Delete | 55 |
PageUp | 56 |
PageDown | 57 |
Home | 58 |
End | 59 |
CapsLock | 60 |
ScrollLock | 61 |
PrintScreen | 62 |
Pause | 63 |
NumLock | 64 |
Clear | 65 |
Sleep | 66 |
Keypad0 | 67 |
Keypad1 | 68 |
Keypad2 | 69 |
Keypad3 | 70 |
Keypad4 | 71 |
Keypad5 | 72 |
Keypad6 | 73 |
Keypad7 | 74 |
Keypad8 | 75 |
Keypad9 | 76 |
KeypadDivide | 77 |
KeypadMultiply | 78 |
KeypadSubtract | 79 |
KeypadAdd | 80 |
KeypadDecimal | 81 |
KeypadEnter | 82 |
A | 83 |
B | 84 |
C | 85 |
D | 86 |
E | 87 |
F | 88 |
G | 89 |
H | 90 |
I | 91 |
J | 92 |
K | 93 |
L | 94 |
M | 95 |
N | 96 |
O | 97 |
P | 98 |
Q | 99 |
R | 100 |
S | 101 |
T | 102 |
U | 103 |
V | 104 |
W | 105 |
X | 106 |
Y | 107 |
Z | 108 |
Number0 | 109 |
Number1 | 110 |
Number2 | 111 |
Number3 | 112 |
Number4 | 113 |
Number5 | 114 |
Number6 | 115 |
Number7 | 116 |
Number8 | 117 |
Number9 | 118 |
Tilde | 119 |
Minus | 120 |
Plus | 121 |
BracketLeft | 122 |
BracketRight | 123 |
Semicolon | 124 |
Quote | 125 |
Comma | 126 |
Period | 127 |
Slash | 128 |
BackSlash | 129 |
NonUSBackSlash | 130 |
Last | 131 |
See Also

Reference

Duality.Input Namespace


KeyboardInput Class

KeyboardInput Class
Provides access to user keyboard input.
Inheritance Hierarchy
SystemObject
Duality.InputKeyboardInput

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class KeyboardInput : IUserInput

The KeyboardInput type exposes the following members.

Methods
 | Name | Description
Public method | KeyHit | Returns whether the specified key was hit this frame.
Public method | KeyPressed | Returns whether the specified key is currently pressed.
Public method | KeyReleased | Returns whether the specified key was released this frame.
Top
Properties
 | Name | Description
Public property | CharInput | [GET] Returns the concatenated character input that was typed since the last input update.
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Item | [GET] Returns whether a specific key is currently pressed.
Public property | Source | [GET / SET] The keyboard inputs data source.
Top
Events
 | Name | Description
Public event | BecomesAvailable | Fired when keyboard input becomes available to Duality.
Public event | KeyDown | Fired once when a key is pressed.
Public event | KeyUp | Fired when a key is no longer pressed.
Public event | NoLongerAvailable | Fired when keyboard input is no longer available to Duality.
Top
See Also

Reference

Duality.Input Namespace


KeyboardInput Methods

KeyboardInput Methods

The KeyboardInput type exposes the following members.

Methods
 | Name | Description
Public method | KeyHit | Returns whether the specified key was hit this frame.
Public method | KeyPressed | Returns whether the specified key is currently pressed.
Public method | KeyReleased | Returns whether the specified key was released this frame.
Top
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.KeyHit Method

KeyboardInputKeyHit Method
Returns whether the specified key was hit this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool KeyHit(
    Key key
)

Parameters

key
Type: Duality.InputKey

Return Value

Type: Boolean
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.KeyPressed Method

KeyboardInputKeyPressed Method
Returns whether the specified key is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool KeyPressed(
    Key key
)

Parameters

key
Type: Duality.InputKey

Return Value

Type: Boolean
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.KeyReleased Method

KeyboardInputKeyReleased Method
Returns whether the specified key was released this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool KeyReleased(
    Key key
)

Parameters

key
Type: Duality.InputKey

Return Value

Type: Boolean
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput Properties

KeyboardInput Properties

The KeyboardInput type exposes the following members.

Properties
 | Name | Description
Public property | CharInput | [GET] Returns the concatenated character input that was typed since the last input update.
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Item | [GET] Returns whether a specific key is currently pressed.
Public property | Source | [GET / SET] The keyboard inputs data source.
Top
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.CharInput Property

KeyboardInputCharInput Property
[GET] Returns the concatenated character input that was typed since the last input update.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string CharInput { get; }

Property Value

Type: String
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.Description Property

KeyboardInputDescription Property
[GET] A text description of this input.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Description { get; }

Property Value

Type: String

Implements

IUserInputDescription
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.IsAvailable Property

KeyboardInputIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAvailable { get; }

Property Value

Type: Boolean

Implements

IUserInputIsAvailable
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.Item Property

KeyboardInputItem Property
[GET] Returns whether a specific key is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool this[
    Key key
] { get; }

Parameters

key
Type: Duality.InputKey

Return Value

Type: Boolean
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.Source Property

KeyboardInputSource Property
[GET / SET] The keyboard inputs data source.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IKeyboardInputSource Source { get; set; }

Property Value

Type: IKeyboardInputSource
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput Events

KeyboardInput Events

The KeyboardInput type exposes the following members.

Events
 | Name | Description
Public event | BecomesAvailable | Fired when keyboard input becomes available to Duality.
Public event | KeyDown | Fired once when a key is pressed.
Public event | KeyUp | Fired when a key is no longer pressed.
Public event | NoLongerAvailable | Fired when keyboard input is no longer available to Duality.
Top
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.BecomesAvailable Event

KeyboardInputBecomesAvailable Event
Fired when keyboard input becomes available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler BecomesAvailable

Value

Type: SystemEventHandler

Implements

IUserInputBecomesAvailable
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.KeyDown Event

KeyboardInputKeyDown Event
Fired once when a key is pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<KeyboardKeyEventArgs> KeyDown

Value

Type: SystemEventHandler KeyboardKeyEventArgs
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.KeyUp Event

KeyboardInputKeyUp Event
Fired when a key is no longer pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<KeyboardKeyEventArgs> KeyUp

Value

Type: SystemEventHandler KeyboardKeyEventArgs
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardInput.NoLongerAvailable Event

KeyboardInputNoLongerAvailable Event
Fired when keyboard input is no longer available to Duality.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler NoLongerAvailable

Value

Type: SystemEventHandler

Implements

IUserInputNoLongerAvailable
See Also

Reference

KeyboardInput Class
Duality.Input Namespace


KeyboardKeyEventArgs Class

KeyboardKeyEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputKeyboardKeyEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class KeyboardKeyEventArgs : UserInputEventArgs

The KeyboardKeyEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | KeyboardKeyEventArgs | Initializes a new instance of the KeyboardKeyEventArgs class
Top
Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | IsPressed |
Public property | Key |
Top
See Also

Reference

Duality.Input Namespace


KeyboardKeyEventArgs Constructor

KeyboardKeyEventArgs Constructor
Initializes a new instance of the KeyboardKeyEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public KeyboardKeyEventArgs(
    KeyboardInput inputChannel,
    Key key,
    bool pressed
)

Parameters

inputChannel
Type: Duality.InputKeyboardInput
key
Type: Duality.InputKey
pressed
Type: SystemBoolean
See Also

Reference

KeyboardKeyEventArgs Class
Duality.Input Namespace


KeyboardKeyEventArgs Properties

KeyboardKeyEventArgs Properties

The KeyboardKeyEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | IsPressed |
Public property | Key |
Top
See Also

Reference

KeyboardKeyEventArgs Class
Duality.Input Namespace


KeyboardKeyEventArgs.IsPressed Property

KeyboardKeyEventArgsIsPressed Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPressed { get; }

Property Value

Type: Boolean
See Also

Reference

KeyboardKeyEventArgs Class
Duality.Input Namespace


KeyboardKeyEventArgs.Key Property

KeyboardKeyEventArgsKey Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Key Key { get; }

Property Value

Type: Key
See Also

Reference

KeyboardKeyEventArgs Class
Duality.Input Namespace


MouseButton Enumeration

MouseButton Enumeration

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum MouseButton
Members
Member name | Value | Description
Left | 0 |
Middle | 1 |
Right | 2 |
Extra1 | 3 |
Extra2 | 4 |
Extra3 | 5 |
Extra4 | 6 |
Extra5 | 7 |
Extra6 | 8 |
Extra7 | 9 |
Extra8 | 10 |
Extra9 | 11 |
Last | 11 |
See Also

Reference

Duality.Input Namespace


MouseButtonEventArgs Class

MouseButtonEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputMouseEventArgs
Duality.InputMouseButtonEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class MouseButtonEventArgs : MouseEventArgs

The MouseButtonEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | MouseButtonEventArgs | Initializes a new instance of the MouseButtonEventArgs class
Top
Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | IsPressed |
Public property | Position | (Inherited from MouseEventArgs.)
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

Duality.Input Namespace


MouseButtonEventArgs Constructor

MouseButtonEventArgs Constructor
Initializes a new instance of the MouseButtonEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MouseButtonEventArgs(
    MouseInput inputChannel,
    int x,
    int y,
    MouseButton button,
    bool pressed
)

Parameters

inputChannel
Type: Duality.InputMouseInput
x
Type: SystemInt32
y
Type: SystemInt32
button
Type: Duality.InputMouseButton
pressed
Type: SystemBoolean
See Also

Reference

MouseButtonEventArgs Class
Duality.Input Namespace


MouseButtonEventArgs Properties

MouseButtonEventArgs Properties

The MouseButtonEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Button |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | IsPressed |
Public property | Position | (Inherited from MouseEventArgs.)
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

MouseButtonEventArgs Class
Duality.Input Namespace


MouseButtonEventArgs.Button Property

MouseButtonEventArgsButton Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MouseButton Button { get; }

Property Value

Type: MouseButton
See Also

Reference

MouseButtonEventArgs Class
Duality.Input Namespace


MouseButtonEventArgs.IsPressed Property

MouseButtonEventArgsIsPressed Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPressed { get; }

Property Value

Type: Boolean
See Also

Reference

MouseButtonEventArgs Class
Duality.Input Namespace


MouseEventArgs Class

MouseEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputMouseEventArgs
Duality.InputMouseButtonEventArgs
Duality.InputMouseMoveEventArgs
Duality.InputMouseWheelEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class MouseEventArgs : UserInputEventArgs

The MouseEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | MouseEventArgs | Initializes a new instance of the MouseEventArgs class
Top
Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position |
Public property | X |
Public property | Y |
Top
See Also

Reference

Duality.Input Namespace


MouseEventArgs Constructor

MouseEventArgs Constructor
Initializes a new instance of the MouseEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MouseEventArgs(
    MouseInput inputChannel,
    int x,
    int y
)

Parameters

inputChannel
Type: Duality.InputMouseInput
x
Type: SystemInt32
y
Type: SystemInt32
See Also

Reference

MouseEventArgs Class
Duality.Input Namespace


MouseEventArgs Properties

MouseEventArgs Properties

The MouseEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position |
Public property | X |
Public property | Y |
Top
See Also

Reference

MouseEventArgs Class
Duality.Input Namespace


MouseEventArgs.Position Property

MouseEventArgsPosition Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Position { get; }

Property Value

Type: Vector2
See Also

Reference

MouseEventArgs Class
Duality.Input Namespace


MouseEventArgs.X Property

MouseEventArgsX Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int X { get; }

Property Value

Type: Int32
See Also

Reference

MouseEventArgs Class
Duality.Input Namespace


MouseEventArgs.Y Property

MouseEventArgsY Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Y { get; }

Property Value

Type: Int32
See Also

Reference

MouseEventArgs Class
Duality.Input Namespace


MouseInput Class

MouseInput Class
Provides access to user mouse input.
Inheritance Hierarchy
SystemObject
Duality.InputMouseInput

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class MouseInput : IUserInput

The MouseInput type exposes the following members.

Methods
 | Name | Description
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Top
Properties
 | Name | Description
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Item | [GET] Returns whether a specific MouseButton is currently pressed.
Public property | Pos | [GET] The current viewport-local cursor position.
Public property | Source | [GET / SET] The mouse inputs data source.
Public property | Vel | [GET] The viewport-local cursor position change since last frame.
Public property | Wheel | [GET] The current mouse wheel value
Public property | WheelPrecise | [GET] The current (precise, high resolution) mouse wheel value
Public property | WheelSpeed | [GET] Returns the change of the mouse wheel value since last frame.
Public property | WheelSpeedPrecise | [GET] Returns the (precise, high resolution) change of the mouse wheel value since last frame.
Public property | X | [GET / SET] The current viewport-local cursor X position.
Public property | XSpeed | [GET] Returns the X position change since last frame.
Public property | Y | [GET / SET] The current viewport-local cursor Y position.
Public property | YSpeed | [GET] Returns the Y position change since last frame.
Top
Events
 | Name | Description
Public event | BecomesAvailable | Fired when the cursor enters the viewport area.
Public event | ButtonDown | Fired once when a MouseButton is pressed.
Public event | ButtonUp | Fired when a MouseButton is no longer pressed.
Public event | Move | Fired when the cursor moves.
Public event | NoLongerAvailable | Fired when the cursor leaves the viewport area.
Public event | WheelChanged | Fired when the mouse wheel value changes.
Top
See Also

Reference

Duality.Input Namespace


MouseInput Methods

MouseInput Methods

The MouseInput type exposes the following members.

Methods
 | Name | Description
Public method | ButtonHit | Returns whether the specified button was hit this frame.
Public method | ButtonPressed | Returns whether the specified button is currently pressed.
Public method | ButtonReleased | Returns whether the specified button was released this frame.
Top
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.ButtonHit Method

MouseInputButtonHit Method
Returns whether the specified button was hit this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonHit(
    MouseButton button
)

Parameters

button
Type: Duality.InputMouseButton

Return Value

Type: Boolean
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.ButtonPressed Method

MouseInputButtonPressed Method
Returns whether the specified button is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonPressed(
    MouseButton button
)

Parameters

button
Type: Duality.InputMouseButton

Return Value

Type: Boolean
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.ButtonReleased Method

MouseInputButtonReleased Method
Returns whether the specified button was released this frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ButtonReleased(
    MouseButton button
)

Parameters

button
Type: Duality.InputMouseButton

Return Value

Type: Boolean
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput Properties

MouseInput Properties

The MouseInput type exposes the following members.

Properties
 | Name | Description
Public property | Description | [GET] A text description of this input.
Public property | IsAvailable | [GET] Returns whether this input is currently available.
Public property | Item | [GET] Returns whether a specific MouseButton is currently pressed.
Public property | Pos | [GET] The current viewport-local cursor position.
Public property | Source | [GET / SET] The mouse inputs data source.
Public property | Vel | [GET] The viewport-local cursor position change since last frame.
Public property | Wheel | [GET] The current mouse wheel value
Public property | WheelPrecise | [GET] The current (precise, high resolution) mouse wheel value
Public property | WheelSpeed | [GET] Returns the change of the mouse wheel value since last frame.
Public property | WheelSpeedPrecise | [GET] Returns the (precise, high resolution) change of the mouse wheel value since last frame.
Public property | X | [GET / SET] The current viewport-local cursor X position.
Public property | XSpeed | [GET] Returns the X position change since last frame.
Public property | Y | [GET / SET] The current viewport-local cursor Y position.
Public property | YSpeed | [GET] Returns the Y position change since last frame.
Top
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Description Property

MouseInputDescription Property
[GET] A text description of this input.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Description { get; }

Property Value

Type: String

Implements

IUserInputDescription
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.IsAvailable Property

MouseInputIsAvailable Property
[GET] Returns whether this input is currently available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsAvailable { get; }

Property Value

Type: Boolean

Implements

IUserInputIsAvailable
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Item Property

MouseInputItem Property
[GET] Returns whether a specific MouseButton is currently pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool this[
    MouseButton btn
] { get; }

Parameters

btn
Type: Duality.InputMouseButton

Return Value

Type: Boolean
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Pos Property

MouseInputPos Property
[GET] The current viewport-local cursor position.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Pos { get; }

Property Value

Type: Vector2
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Source Property

MouseInputSource Property
[GET / SET] The mouse inputs data source.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IMouseInputSource Source { get; set; }

Property Value

Type: IMouseInputSource
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Vel Property

MouseInputVel Property
[GET] The viewport-local cursor position change since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Vel { get; }

Property Value

Type: Vector2
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Wheel Property

MouseInputWheel Property
[GET] The current mouse wheel value

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Wheel { get; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.WheelPrecise Property

MouseInputWheelPrecise Property
[GET] The current (precise, high resolution) mouse wheel value

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float WheelPrecise { get; }

Property Value

Type: Single
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.WheelSpeed Property

MouseInputWheelSpeed Property
[GET] Returns the change of the mouse wheel value since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int WheelSpeed { get; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.WheelSpeedPrecise Property

MouseInputWheelSpeedPrecise Property
[GET] Returns the (precise, high resolution) change of the mouse wheel value since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float WheelSpeedPrecise { get; }

Property Value

Type: Single
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.X Property

MouseInputX Property
[GET / SET] The current viewport-local cursor X position.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int X { get; set; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.XSpeed Property

MouseInputXSpeed Property
[GET] Returns the X position change since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int XSpeed { get; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Y Property

MouseInputY Property
[GET / SET] The current viewport-local cursor Y position.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Y { get; set; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.YSpeed Property

MouseInputYSpeed Property
[GET] Returns the Y position change since last frame.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int YSpeed { get; }

Property Value

Type: Int32
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput Events

MouseInput Events

The MouseInput type exposes the following members.

Events
 | Name | Description
Public event | BecomesAvailable | Fired when the cursor enters the viewport area.
Public event | ButtonDown | Fired once when a MouseButton is pressed.
Public event | ButtonUp | Fired when a MouseButton is no longer pressed.
Public event | Move | Fired when the cursor moves.
Public event | NoLongerAvailable | Fired when the cursor leaves the viewport area.
Public event | WheelChanged | Fired when the mouse wheel value changes.
Top
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.BecomesAvailable Event

MouseInputBecomesAvailable Event
Fired when the cursor enters the viewport area.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler BecomesAvailable

Value

Type: SystemEventHandler

Implements

IUserInputBecomesAvailable
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.ButtonDown Event

MouseInputButtonDown Event
Fired once when a MouseButton is pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<MouseButtonEventArgs> ButtonDown

Value

Type: SystemEventHandler MouseButtonEventArgs
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.ButtonUp Event

MouseInputButtonUp Event
Fired when a MouseButton is no longer pressed.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<MouseButtonEventArgs> ButtonUp

Value

Type: SystemEventHandler MouseButtonEventArgs
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.Move Event

MouseInputMove Event
Fired when the cursor moves.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<MouseMoveEventArgs> Move

Value

Type: SystemEventHandler MouseMoveEventArgs
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.NoLongerAvailable Event

MouseInputNoLongerAvailable Event
Fired when the cursor leaves the viewport area.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler NoLongerAvailable

Value

Type: SystemEventHandler

Implements

IUserInputNoLongerAvailable
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseInput.WheelChanged Event

MouseInputWheelChanged Event
Fired when the mouse wheel value changes.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public event EventHandler<MouseWheelEventArgs> WheelChanged

Value

Type: SystemEventHandler MouseWheelEventArgs
See Also

Reference

MouseInput Class
Duality.Input Namespace


MouseMoveEventArgs Class

MouseMoveEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputMouseEventArgs
Duality.InputMouseMoveEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class MouseMoveEventArgs : MouseEventArgs

The MouseMoveEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | MouseMoveEventArgs | Initializes a new instance of the MouseMoveEventArgs class
Top
Properties
 | Name | Description
Public property | Delta |
Public property | DeltaX |
Public property | DeltaY |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position | (Inherited from MouseEventArgs.)
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

Duality.Input Namespace


MouseMoveEventArgs Constructor

MouseMoveEventArgs Constructor
Initializes a new instance of the MouseMoveEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MouseMoveEventArgs(
    MouseInput inputChannel,
    int x,
    int y,
    int deltaX,
    int deltaY
)

Parameters

inputChannel
Type: Duality.InputMouseInput
x
Type: SystemInt32
y
Type: SystemInt32
deltaX
Type: SystemInt32
deltaY
Type: SystemInt32
See Also

Reference

MouseMoveEventArgs Class
Duality.Input Namespace


MouseMoveEventArgs Properties

MouseMoveEventArgs Properties

The MouseMoveEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Delta |
Public property | DeltaX |
Public property | DeltaY |
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position | (Inherited from MouseEventArgs.)
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

MouseMoveEventArgs Class
Duality.Input Namespace


MouseMoveEventArgs.Delta Property

MouseMoveEventArgsDelta Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Delta { get; }

Property Value

Type: Vector2
See Also

Reference

MouseMoveEventArgs Class
Duality.Input Namespace


MouseMoveEventArgs.DeltaX Property

MouseMoveEventArgsDeltaX Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int DeltaX { get; }

Property Value

Type: Int32
See Also

Reference

MouseMoveEventArgs Class
Duality.Input Namespace


MouseMoveEventArgs.DeltaY Property

MouseMoveEventArgsDeltaY Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int DeltaY { get; }

Property Value

Type: Int32
See Also

Reference

MouseMoveEventArgs Class
Duality.Input Namespace


MouseWheelEventArgs Class

MouseWheelEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputMouseEventArgs
Duality.InputMouseWheelEventArgs

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class MouseWheelEventArgs : MouseEventArgs

The MouseWheelEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | MouseWheelEventArgs | Initializes a new instance of the MouseWheelEventArgs class
Top
Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position | (Inherited from MouseEventArgs.)
Public property | WheelDelta |
Public property | WheelValue |
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

Duality.Input Namespace


MouseWheelEventArgs Constructor

MouseWheelEventArgs Constructor
Initializes a new instance of the MouseWheelEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MouseWheelEventArgs(
    MouseInput inputChannel,
    int x,
    int y,
    int value,
    int delta
)

Parameters

inputChannel
Type: Duality.InputMouseInput
x
Type: SystemInt32
y
Type: SystemInt32
value
Type: SystemInt32
delta
Type: SystemInt32
See Also

Reference

MouseWheelEventArgs Class
Duality.Input Namespace


MouseWheelEventArgs Properties

MouseWheelEventArgs Properties

The MouseWheelEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | InputChannel | (Inherited from UserInputEventArgs.)
Public property | Position | (Inherited from MouseEventArgs.)
Public property | WheelDelta |
Public property | WheelValue |
Public property | X | (Inherited from MouseEventArgs.)
Public property | Y | (Inherited from MouseEventArgs.)
Top
See Also

Reference

MouseWheelEventArgs Class
Duality.Input Namespace


MouseWheelEventArgs.WheelDelta Property

MouseWheelEventArgsWheelDelta Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float WheelDelta { get; }

Property Value

Type: Single
See Also

Reference

MouseWheelEventArgs Class
Duality.Input Namespace


MouseWheelEventArgs.WheelValue Property

MouseWheelEventArgsWheelValue Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float WheelValue { get; }

Property Value

Type: Single
See Also

Reference

MouseWheelEventArgs Class
Duality.Input Namespace


UserInputCollection(TInput, TSource) Class

UserInputCollectionTInput, TSource Class
Provides access to a named set of user input devices.
Inheritance Hierarchy
SystemObject
Duality.InputUserInputCollectionTInput, TSource
Duality.InputGamepadInputCollection
Duality.InputJoystickInputCollection

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class UserInputCollection<TInput, TSource> : IList<TInput>,
    ICollection<TInput>, IEnumerable<TInput>, IList, ICollection,
    IEnumerable
where TInput : class, IUserInput
where TSource : class, IUserInputSource

Type Parameters

TInput
TSource

The UserInputCollectionTInput, TSource type exposes the following members.

Constructors
 | Name | Description
Public method | UserInputCollectionTInput, TSource | Initializes a new instance of the UserInputCollectionTInput, TSource class
Top
Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources.
Public method | AddSource(TSource) | Adds a new user input source.
Public method | ClearSources | Removes all user input sources.
Public method | Contains | Returns whether a certain user input is known.
Public method | CopyTo | Copies all known user inputs to the specified array.
Protected method | CreateDummyInput |
Protected method | CreateInput |
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs.
Public method | IndexOf | Returns the index of a specific user input.
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Top
Extension Methods
 | Name | Description
Public Extension Method | GetCombinedHashCodeTInput | Returns the combined hash code of the specified list. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstTInput(TInput) | Overloaded. Returns the index of the first object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstTInput(PredicateTInput) | Overloaded. Returns the index of the first object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastTInput(TInput) | Overloaded. Returns the index of the last object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastTInput(PredicateTInput) | Overloaded. Returns the index of the last object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | NotNullTInput | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeTInput | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualTInput(IEnumerableTInput) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualTInput(IEnumerableTInput, IEqualityComparerTInput) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ShuffleTInput | Shuffles the specified eumerable. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | StableSortTInput | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(IComparerTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(ComparisonTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32, IComparerTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32, ComparisonTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | ToStringTInput(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringTInput(FuncTInput, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available.
Public property | ItemInt32 | [GET] Returns a specific input by index.
Public property | ItemString | [GET] Returns a specific input by its Description.
Top
See Also

Reference

Duality.Input Namespace


UserInputCollection(TInput, TSource) Constructor

UserInputCollectionTInput, TSource Constructor
Initializes a new instance of the UserInputCollectionTInput, TSource class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public UserInputCollection()
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource) Methods

UserInputCollectionTInput, TSource Methods

The UserInputCollectionTInput, TSource generic type exposes the following members.

Methods
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources.
Public method | AddSource(TSource) | Adds a new user input source.
Public method | ClearSources | Removes all user input sources.
Public method | Contains | Returns whether a certain user input is known.
Public method | CopyTo | Copies all known user inputs to the specified array.
Protected method | CreateDummyInput |
Protected method | CreateInput |
Public method | GetEnumerator | Returns an enumerator to iterate over all known user inputs.
Public method | IndexOf | Returns the index of a specific user input.
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Top
Extension Methods
 | Name | Description
Public Extension Method | GetCombinedHashCodeTInput | Returns the combined hash code of the specified list. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstTInput(TInput) | Overloaded. Returns the index of the first object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfFirstTInput(PredicateTInput) | Overloaded. Returns the index of the first object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastTInput(TInput) | Overloaded. Returns the index of the last object matching the specified one. (Defined by ExtMethodsIList.)
Public Extension Method | IndexOfLastTInput(PredicateTInput) | Overloaded. Returns the index of the last object matching the specified predicate. (Defined by ExtMethodsIList.)
Public Extension Method | NotNullTInput | Enumerates objects that aren't null. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | RangeTInput | Enumerates a all objects within a specific index range. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualTInput(IEnumerableTInput) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | SetEqualTInput(IEnumerableTInput, IEqualityComparerTInput) | Overloaded. Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements and for each element in one set, there is a matching element in the other. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ShuffleTInput | Shuffles the specified eumerable. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | StableSortTInput | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(IComparerTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(ComparisonTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32, IComparerTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | StableSortTInput(Int32, Int32, ComparisonTInput) | Overloaded. Performs a stable sort. (Defined by ExtMethodsIList.)
Public Extension Method | ToStringTInput(String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Public Extension Method | ToStringTInput(FuncTInput, String, String) | Overloaded. Creates a separated list of the string versions of a set of objects. (Defined by ExtMethodsIEnumerable.)
Top
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).AddSource Method

UserInputCollectionTInput, TSourceAddSource Method
Overload List
 | Name | Description
Public method | AddSource(IEnumerableTSource) | Adds a set of new user input sources.
Public method | AddSource(TSource) | Adds a new user input source.
Top
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).AddSource Method (IEnumerable(TSource))

UserInputCollectionTInput, TSourceAddSource Method (IEnumerableTSource)
Adds a set of new user input sources.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddSource(
    IEnumerable<TSource> source
)

Parameters

source
Type: System.Collections.GenericIEnumerable TSource
See Also

Reference

UserInputCollectionTInput, TSource Class
AddSource Overload
Duality.Input Namespace


UserInputCollection(TInput, TSource).AddSource Method (TSource)

UserInputCollectionTInput, TSourceAddSource Method (TSource)
Adds a new user input source.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddSource(
    TSource source
)

Parameters

source
Type: TSource
See Also

Reference

UserInputCollectionTInput, TSource Class
AddSource Overload
Duality.Input Namespace


UserInputCollection(TInput, TSource).ClearSources Method

UserInputCollectionTInput, TSourceClearSources Method
Removes all user input sources.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearSources()
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).Contains Method

UserInputCollectionTInput, TSourceContains Method
Returns whether a certain user input is known.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Contains(
    TInput item
)

Parameters

item
Type: TInput

Return Value

Type: Boolean

Implements

ICollectionTContains(T)
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).CopyTo Method

UserInputCollectionTInput, TSourceCopyTo Method
Copies all known user inputs to the specified array.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    TInput[] array,
    int arrayIndex
)

Parameters

array
Type: TInput
arrayIndex
Type: SystemInt32

Implements

ICollectionTCopyTo(T, Int32)
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).CreateDummyInput Method

UserInputCollectionTInput, TSourceCreateDummyInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract TInput CreateDummyInput()

Return Value

Type: TInput
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).CreateInput Method

UserInputCollectionTInput, TSourceCreateInput Method

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract TInput CreateInput(
    TSource source
)

Parameters

source
Type: TSource

Return Value

Type: TInput
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).GetEnumerator Method

UserInputCollectionTInput, TSourceGetEnumerator Method
Returns an enumerator to iterate over all known user inputs.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerator<TInput> GetEnumerator()

Return Value

Type: IEnumerator TInput

Implements

IEnumerableTGetEnumerator
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).IndexOf Method

UserInputCollectionTInput, TSourceIndexOf Method
Returns the index of a specific user input.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int IndexOf(
    TInput item
)

Parameters

item
Type: TInput

Return Value

Type: Int32

Implements

IListTIndexOf(T)
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).RemoveSource Method

UserInputCollectionTInput, TSourceRemoveSource Method
Overload List
 | Name | Description
Public method | RemoveSource(IEnumerableTSource) | Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Public method | RemoveSource(TSource) | Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered.
Top
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).RemoveSource Method (IEnumerable(TSource))

UserInputCollectionTInput, TSourceRemoveSource Method (IEnumerableTSource)
Removes a set of previously registered user input sources. Note that each JoystickInput will still exist, but become unavailable until a new matching input source is registered.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RemoveSource(
    IEnumerable<TSource> source
)

Parameters

source
Type: System.Collections.GenericIEnumerable TSource

Return Value

Type: Boolean
Returns true, if all sources were successfully removed.
See Also

Reference

UserInputCollectionTInput, TSource Class
RemoveSource Overload
Duality.Input Namespace


UserInputCollection(TInput, TSource).RemoveSource Method (TSource)

UserInputCollectionTInput, TSourceRemoveSource Method (TSource)
Removes a previously registered user input source. Note that the JoystickInput will still exist, but become unavailable until a new matching input source is registered.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool RemoveSource(
    TSource source
)

Parameters

source
Type: TSource

Return Value

Type: Boolean
Returns true, if the source was successfully removed.
See Also

Reference

UserInputCollectionTInput, TSource Class
RemoveSource Overload
Duality.Input Namespace


UserInputCollection(TInput, TSource) Properties

UserInputCollectionTInput, TSource Properties

The UserInputCollectionTInput, TSource generic type exposes the following members.

Properties
 | Name | Description
Public property | Count | [GET] Returns how many user inputs are known. Not all of them are necessarily available.
Public property | ItemInt32 | [GET] Returns a specific input by index.
Public property | ItemString | [GET] Returns a specific input by its Description.
Top
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).Count Property

UserInputCollectionTInput, TSourceCount Property
[GET] Returns how many user inputs are known. Not all of them are necessarily available.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32

Implements

ICollectionTCount
ICollectionCount
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).Item Property

UserInputCollectionTInput, TSourceItem Property
Overload List
 | Name | Description
Public property | ItemInt32 | [GET] Returns a specific input by index.
Public property | ItemString | [GET] Returns a specific input by its Description.
Top
See Also

Reference

UserInputCollectionTInput, TSource Class
Duality.Input Namespace


UserInputCollection(TInput, TSource).Item Property (Int32)

UserInputCollectionTInput, TSourceItem Property (Int32)
[GET] Returns a specific input by index.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TInput this[
    int index
] { get; }

Parameters

index
Type: SystemInt32

Return Value

Type: TInput
See Also

Reference

UserInputCollectionTInput, TSource Class
Item Overload
Duality.Input Namespace


UserInputCollection(TInput, TSource).Item Property (String)

UserInputCollectionTInput, TSourceItem Property (String)
[GET] Returns a specific input by its Description.

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TInput this[
    string desc
] { get; }

Parameters

desc
Type: SystemString

Return Value

Type: TInput
See Also

Reference

UserInputCollectionTInput, TSource Class
Item Overload
Duality.Input Namespace


UserInputEventArgs Class

UserInputEventArgs Class
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
More...

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class UserInputEventArgs : EventArgs

The UserInputEventArgs type exposes the following members.

Constructors
 | Name | Description
Public method | UserInputEventArgs | Initializes a new instance of the UserInputEventArgs class
Top
Properties
 | Name | Description
Public property | InputChannel |
Top
See Also

Reference

Duality.Input Namespace
Inheritance Hierarchy
SystemObject
SystemEventArgs
Duality.InputUserInputEventArgs
Duality.InputGamepadAxisEventArgs
Duality.InputGamepadButtonEventArgs
Duality.InputJoystickAxisEventArgs
Duality.InputJoystickButtonEventArgs
Duality.InputJoystickHatEventArgs
Duality.InputKeyboardKeyEventArgs
Duality.InputMouseEventArgs


UserInputEventArgs Constructor

UserInputEventArgs Constructor
Initializes a new instance of the UserInputEventArgs class

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public UserInputEventArgs(
    IUserInput inputChannel
)

Parameters

inputChannel
Type: Duality.InputIUserInput
See Also

Reference

UserInputEventArgs Class
Duality.Input Namespace


UserInputEventArgs Properties

UserInputEventArgs Properties

The UserInputEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | InputChannel |
Top
See Also

Reference

UserInputEventArgs Class
Duality.Input Namespace


UserInputEventArgs.InputChannel Property

UserInputEventArgsInputChannel Property

Namespace: Duality.Input
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IUserInput InputChannel { get; }

Property Value

Type: IUserInput
See Also

Reference

UserInputEventArgs Class
Duality.Input Namespace


Duality.IO Namespace

Duality.IO Namespace
Classes
 | Class | Description
Public class | DirectoryOp | Defines static methods for performing common file system operations on directories.
Public class | ExtMethodsStream |
Public class | FileOp | Defines static methods for performing common file system operations on files.
Public class | NonClosingStreamWrapper | Wraps a Stream, but only pretends to close it without actually doing so.
Public class | PathEqualityComparer | Determines equality of path strings.
Public class | PathOp | Defines static methods for performing common operations on path strings, such as combining them or extracting file extensions. This class mirrors the functionality of Path in a platform-agnostic way using Duality's path format.
Public class | StreamWrapper | Wraps a Stream within a new one, and forwards all functionality to the underlying Stream.
Public class | SubStreamWrapper | Wraps a Stream inside a proxy that allows accessing only a certain portion of the Stream, beginning a its current Position. Using internal buffering, the SubStream allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the SubStream will not close its underlying Stream.
Interfaces
 | Interface | Description
Public interface | IFileSystem | A file system allows to perform read / write operations on a virtual or actual storage device. All paths are expected to match Duality's path format.
Enumerations
 | Enumeration | Description
Public enumeration | FileAccessMode |
Public enumeration | NamedDirectory | Enumerates special directories on the current system.


DirectoryOp Class

DirectoryOp Class
Defines static methods for performing common file system operations on directories.
Inheritance Hierarchy
SystemObject
Duality.IODirectoryOp

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class DirectoryOp

The DirectoryOp type exposes the following members.

Methods
Name | Description
Create | Creates a directory tree matching the specified directory path.
Delete | Deletes the directory that is referred to by the specified path.
Exists | Returns whether the specified path refers to an existing directory.
GetDirectories | Enumerates all directories that are located within the specified path.
GetFiles | Enumerates all files that are located within the specified path.
Top
See Also

Reference

Duality.IO Namespace


DirectoryOp Methods

DirectoryOp Methods

The DirectoryOp type exposes the following members.

Methods
Name | Description
Create | Creates a directory tree matching the specified directory path.
Delete | Deletes the directory that is referred to by the specified path.
Exists | Returns whether the specified path refers to an existing directory.
GetDirectories | Enumerates all directories that are located within the specified path.
GetFiles | Enumerates all files that are located within the specified path.
Top
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


DirectoryOp.Create Method

DirectoryOpCreate Method
Creates a directory tree matching the specified directory path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Create(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


DirectoryOp.Delete Method

DirectoryOpDelete Method
Deletes the directory that is referred to by the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Delete(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


DirectoryOp.Exists Method

DirectoryOpExists Method
Returns whether the specified path refers to an existing directory.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool Exists(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


DirectoryOp.GetDirectories Method

DirectoryOpGetDirectories Method
Enumerates all directories that are located within the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<string> GetDirectories(
    string path,
    bool recursive = false
)

Parameters

path
Type: SystemString
recursive (Optional)
Type: SystemBoolean
If true, the specified path will be searched recursively and yield all descendant directory paths.

Return Value

Type: IEnumerable String
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


DirectoryOp.GetFiles Method

DirectoryOpGetFiles Method
Enumerates all files that are located within the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<string> GetFiles(
    string path,
    bool recursive = false
)

Parameters

path
Type: SystemString
recursive (Optional)
Type: SystemBoolean
If true, the specified path will be searched recursively and yield all descendant file paths.

Return Value

Type: IEnumerable String
See Also

Reference

DirectoryOp Class
Duality.IO Namespace


ExtMethodsStream Class

ExtMethodsStream Class
Inheritance Hierarchy
SystemObject
Duality.IOExtMethodsStream

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsStream

The ExtMethodsStream type exposes the following members.

Methods
Name | Description
NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed.
SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream.
Top
See Also

Reference

Duality.IO Namespace


ExtMethodsStream Methods

ExtMethodsStream Methods

The ExtMethodsStream type exposes the following members.

Methods
Name | Description
NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed.
SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream.
Top
See Also

Reference

ExtMethodsStream Class
Duality.IO Namespace


ExtMethodsStream.NonClosing Method

ExtMethodsStreamNonClosing Method
Wraps the Stream inside a proxy that won't close the underlying stream when being closed.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Stream NonClosing(
    this Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: Stream

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsStream Class
Duality.IO Namespace


ExtMethodsStream.SubStream Method

ExtMethodsStreamSubStream Method
Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Stream SubStream(
    this Stream stream,
    long maxLength = -1
)

Parameters

stream
Type: System.IOStream
maxLength (Optional)
Type: SystemInt64
The maximum length in bytes that is accessible using the sub-Stream. Specify -1 for not limiting it.

Return Value

Type: Stream

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsStream Class
Duality.IO Namespace


FileAccessMode Enumeration

FileAccessMode Enumeration

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[FlagsAttribute]
public enum FileAccessMode
Members
Member name | Value | Description
None | 0 |
Read | 1 |
Write | 2 |
ReadWrite | 3 |
See Also

Reference

Duality.IO Namespace


FileOp Class

FileOp Class
Defines static methods for performing common file system operations on files.
Inheritance Hierarchy
SystemObject
Duality.IOFileOp

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class FileOp

The FileOp type exposes the following members.

Methods
Name | Description
Create | Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.
Delete | Deletes the file that is referred to by the specified path.
Exists | Returns whether the specified path refers to an existing file.
Open | Opens an existing file at the specified path and returns a Stream to it.
Top
See Also

Reference

Duality.IO Namespace


FileOp Methods

FileOp Methods

The FileOp type exposes the following members.

Methods
Name | Description
Create | Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.
Delete | Deletes the file that is referred to by the specified path.
Exists | Returns whether the specified path refers to an existing file.
Open | Opens an existing file at the specified path and returns a Stream to it.
Top
See Also

Reference

FileOp Class
Duality.IO Namespace


FileOp.Create Method

FileOpCreate Method
Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Stream Create(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Stream
See Also

Reference

FileOp Class
Duality.IO Namespace


FileOp.Delete Method

FileOpDelete Method
Deletes the file that is referred to by the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Delete(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

FileOp Class
Duality.IO Namespace


FileOp.Exists Method

FileOpExists Method
Returns whether the specified path refers to an existing file.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool Exists(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

FileOp Class
Duality.IO Namespace


FileOp.Open Method

FileOpOpen Method
Opens an existing file at the specified path and returns a Stream to it.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Stream Open(
    string path,
    FileAccessMode mode
)

Parameters

path
Type: SystemString
mode
Type: Duality.IOFileAccessMode

Return Value

Type: Stream
See Also

Reference

FileOp Class
Duality.IO Namespace


IFileSystem Interface

IFileSystem Interface
A file system allows to perform read / write operations on a virtual or actual storage device. All paths are expected to match Duality's path format.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IFileSystem

The IFileSystem type exposes the following members.

Methods
 | Name | Description
Public method | CreateDirectory | Creates a directory tree matching the specified directory path.
Public method | CreateFile | Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.
Public method | DeleteDirectory | Deletes the directory that is referred to by the specified path.
Public method | DeleteFile | Deletes the file that is referred to by the specified path.
Public method | DirectoryExists | Returns whether the specified path refers to an existing directory.
Public method | FileExists | Returns whether the specified path refers to an existing file.
Public method | GetDirectories | Enumerates all directories that are located within the specified path.
Public method | GetFiles | Enumerates all files that are located within the specified path.
Public method | GetFullPath | Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity.
Public method | OpenFile | Opens an existing file at the specified path and returns a Stream to it.
Top
See Also

Reference

Duality.IO Namespace


IFileSystem Methods

IFileSystem Methods

The IFileSystem type exposes the following members.

Methods
 | Name | Description
Public method | CreateDirectory | Creates a directory tree matching the specified directory path.
Public method | CreateFile | Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.
Public method | DeleteDirectory | Deletes the directory that is referred to by the specified path.
Public method | DeleteFile | Deletes the file that is referred to by the specified path.
Public method | DirectoryExists | Returns whether the specified path refers to an existing directory.
Public method | FileExists | Returns whether the specified path refers to an existing file.
Public method | GetDirectories | Enumerates all directories that are located within the specified path.
Public method | GetFiles | Enumerates all files that are located within the specified path.
Public method | GetFullPath | Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity.
Public method | OpenFile | Opens an existing file at the specified path and returns a Stream to it.
Top
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.CreateDirectory Method

IFileSystemCreateDirectory Method
Creates a directory tree matching the specified directory path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void CreateDirectory(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.CreateFile Method

IFileSystemCreateFile Method
Creates or overwrites a file at the specified path and returns a Stream to it. The returned stream has implicit read / write access.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Stream CreateFile(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Stream
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.DeleteDirectory Method

IFileSystemDeleteDirectory Method
Deletes the directory that is referred to by the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void DeleteDirectory(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.DeleteFile Method

IFileSystemDeleteFile Method
Deletes the file that is referred to by the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void DeleteFile(
    string path
)

Parameters

path
Type: SystemString
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.DirectoryExists Method

IFileSystemDirectoryExists Method
Returns whether the specified path refers to an existing directory.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool DirectoryExists(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.FileExists Method

IFileSystemFileExists Method
Returns whether the specified path refers to an existing file.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool FileExists(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.GetDirectories Method

IFileSystemGetDirectories Method
Enumerates all directories that are located within the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<string> GetDirectories(
    string path,
    bool recursive = false
)

Parameters

path
Type: SystemString
recursive (Optional)
Type: SystemBoolean
If true, the specified path will be searched recursively and yield all descendant directory paths.

Return Value

Type: IEnumerable String
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.GetFiles Method

IFileSystemGetFiles Method
Enumerates all files that are located within the specified path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<string> GetFiles(
    string path,
    bool recursive = false
)

Parameters

path
Type: SystemString
recursive (Optional)
Type: SystemBoolean
If true, the specified path will be searched recursively and yield all descendant file paths.

Return Value

Type: IEnumerable String
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.GetFullPath Method

IFileSystemGetFullPath Method
Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
string GetFullPath(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


IFileSystem.OpenFile Method

IFileSystemOpenFile Method
Opens an existing file at the specified path and returns a Stream to it.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Stream OpenFile(
    string path,
    FileAccessMode mode
)

Parameters

path
Type: SystemString
mode
Type: Duality.IOFileAccessMode

Return Value

Type: Stream
See Also

Reference

IFileSystem Interface
Duality.IO Namespace


NamedDirectory Enumeration

NamedDirectory Enumeration
Enumerates special directories on the current system.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum NamedDirectory
Members
Member name | Value | Description
Current | 0 | The directory in which the running Duality application is located.
ApplicationData | 1 | The directory where applications store their data.
MyDocuments | 2 | The current users "My Documents" folder.
MyPictures | 3 | The current users "My Pictures" folder.
MyMusic | 4 | The current users "My Music" folder.
See Also

Reference

Duality.IO Namespace


NonClosingStreamWrapper Class

NonClosingStreamWrapper Class
Wraps a Stream, but only pretends to close it without actually doing so.
Inheritance Hierarchy
SystemObject
SystemMarshalByRefObject
System.IOStream
Duality.IOStreamWrapper
Duality.IONonClosingStreamWrapper
Duality.IOSubStreamWrapper

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class NonClosingStreamWrapper : StreamWrapper

The NonClosingStreamWrapper type exposes the following members.

Constructors
 | Name | Description
Public method | NonClosingStreamWrapper | Initializes a new instance of the NonClosingStreamWrapper class
Top
Methods
 | Name | Description
Protected method | Dispose | Releases the unmanaged resources used by the NonClosingStreamWrapper and optionally releases the managed resources (Overrides StreamWrapperDispose(Boolean).)
Public method | Flush | (Overrides StreamWrapperFlush.)
Public method | Read | (Overrides StreamWrapperRead(Byte, Int32, Int32).)
Public method | ReadByte | (Overrides StreamWrapperReadByte.)
Public method | Seek | (Overrides StreamWrapperSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides StreamWrapperSetLength(Int64).)
Public method | Write | (Overrides StreamWrapperWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Overrides StreamWrapperWriteByte(Byte).)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
Properties
 | Name | Description
Public property | CanRead | (Overrides StreamWrapperCanRead.)
Public property | CanSeek | (Overrides StreamWrapperCanSeek.)
Public property | CanTimeout | (Overrides StreamWrapperCanTimeout.)
Public property | CanWrite | (Overrides StreamWrapperCanWrite.)
Public property | Length | (Overrides StreamWrapperLength.)
Public property | Position | (Overrides StreamWrapperPosition.)
Public property | ReadTimeout | (Inherited from StreamWrapper.)
Public property | WriteTimeout | (Inherited from StreamWrapper.)
Top
See Also

Reference

Duality.IO Namespace


NonClosingStreamWrapper Constructor

NonClosingStreamWrapper Constructor
Initializes a new instance of the NonClosingStreamWrapper class

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public NonClosingStreamWrapper(
    Stream stream
)

Parameters

stream
Type: System.IOStream
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper Methods

NonClosingStreamWrapper Methods

The NonClosingStreamWrapper type exposes the following members.

Methods
 | Name | Description
Protected method | Dispose | (Overrides StreamWrapperDispose(Boolean).)
Public method | Flush | (Overrides StreamWrapperFlush.)
Public method | Read | (Overrides StreamWrapperRead(Byte, Int32, Int32).)
Public method | ReadByte | (Overrides StreamWrapperReadByte.)
Public method | Seek | (Overrides StreamWrapperSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides StreamWrapperSetLength(Int64).)
Public method | Write | (Overrides StreamWrapperWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Overrides StreamWrapperWriteByte(Byte).)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Dispose Method

NonClosingStreamWrapperDispose Method
Releases the unmanaged resources used by the NonClosingStreamWrapper and optionally releases the managed resources

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Dispose(
    bool disposing
)

Parameters

disposing
Type: SystemBoolean
True to release both managed and unmanaged resources; false to release only unmanaged resources
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Flush Method

NonClosingStreamWrapperFlush Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Flush()
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Read Method

NonClosingStreamWrapperRead Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int Read(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32

Return Value

Type: Int32
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.ReadByte Method

NonClosingStreamWrapperReadByte Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int ReadByte()

Return Value

Type: Int32
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Seek Method

NonClosingStreamWrapperSeek Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Seek(
    long offset,
    SeekOrigin origin
)

Parameters

offset
Type: SystemInt64
origin
Type: System.IOSeekOrigin

Return Value

Type: Int64
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.SetLength Method

NonClosingStreamWrapperSetLength Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void SetLength(
    long value
)

Parameters

value
Type: SystemInt64
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Write Method

NonClosingStreamWrapperWrite Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Write(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.WriteByte Method

NonClosingStreamWrapperWriteByte Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteByte(
    byte value
)

Parameters

value
Type: SystemByte
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper Properties

NonClosingStreamWrapper Properties

The NonClosingStreamWrapper type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | (Overrides StreamWrapperCanRead.)
Public property | CanSeek | (Overrides StreamWrapperCanSeek.)
Public property | CanTimeout | (Overrides StreamWrapperCanTimeout.)
Public property | CanWrite | (Overrides StreamWrapperCanWrite.)
Public property | Length | (Overrides StreamWrapperLength.)
Public property | Position | (Overrides StreamWrapperPosition.)
Public property | ReadTimeout | (Inherited from StreamWrapper.)
Public property | WriteTimeout | (Inherited from StreamWrapper.)
Top
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.CanRead Property

NonClosingStreamWrapperCanRead Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanRead { get; }

Property Value

Type: Boolean
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.CanSeek Property

NonClosingStreamWrapperCanSeek Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanSeek { get; }

Property Value

Type: Boolean
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.CanTimeout Property

NonClosingStreamWrapperCanTimeout Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanTimeout { get; }

Property Value

Type: Boolean
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.CanWrite Property

NonClosingStreamWrapperCanWrite Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanWrite { get; }

Property Value

Type: Boolean
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Length Property

NonClosingStreamWrapperLength Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Length { get; }

Property Value

Type: Int64
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


NonClosingStreamWrapper.Position Property

NonClosingStreamWrapperPosition Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Position { get; set; }

Property Value

Type: Int64
See Also

Reference

NonClosingStreamWrapper Class
Duality.IO Namespace


PathEqualityComparer Class

PathEqualityComparer Class
Determines equality of path strings.
Inheritance Hierarchy
SystemObject
Duality.IOPathEqualityComparer

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class PathEqualityComparer : IEqualityComparer<string>

The PathEqualityComparer type exposes the following members.

Constructors
 | Name | Description
Public method | PathEqualityComparer | Initializes a new instance of the PathEqualityComparer class
Top
Methods
 | Name | Description
Public method | Equals |
Public method | GetHashCode |
Top
See Also

Reference

Duality.IO Namespace
Duality.IOPathOp


PathEqualityComparer Constructor

PathEqualityComparer Constructor
Initializes a new instance of the PathEqualityComparer class

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PathEqualityComparer()
See Also

Reference

PathEqualityComparer Class
Duality.IO Namespace


PathEqualityComparer Methods

PathEqualityComparer Methods

The PathEqualityComparer type exposes the following members.

Methods
 | Name | Description
Public method | Equals |
Public method | GetHashCode |
Top
See Also

Reference

PathEqualityComparer Class
Duality.IO Namespace


PathEqualityComparer.Equals Method

PathEqualityComparerEquals Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Equals(
    string x,
    string y
)

Parameters

x
Type: SystemString
y
Type: SystemString

Return Value

Type: Boolean

Implements

IEqualityComparerTEquals(T, T)
See Also

Reference

PathEqualityComparer Class
Duality.IO Namespace


PathEqualityComparer.GetHashCode Method

PathEqualityComparerGetHashCode Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetHashCode(
    string obj
)

Parameters

obj
Type: SystemString

Return Value

Type: Int32

Implements

IEqualityComparerTGetHashCode(T)
See Also

Reference

PathEqualityComparer Class
Duality.IO Namespace


PathOp Class

PathOp Class
Defines static methods for performing common operations on path strings, such as combining them or extracting file extensions. This class mirrors the functionality of Path in a platform-agnostic way using Duality's path format.
Inheritance Hierarchy
SystemObject
Duality.IOPathOp

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class PathOp

The PathOp type exposes the following members.

Methods
Name | Description
ArePathsEqual | Returns whether two paths are referring to the same file system entity. Unlike most methods of PathOp, this method accesses the file system.
Combine(String) | Concatenates any number of path strings.
Combine(String, String) | Concatenates two path strings.
GetDirectoryName | Determines the directory name component of a path, i.e. everything except the rightmost path element name.
GetExtension | Determines the extension of a file path.
GetFileName | Determines the file name component of a path, i.e. the rightmost path element name.
GetFileNameWithoutExtension | Similar to GetFileName(String), but also strips away the files extension.
GetFullPath | Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity. Unlike most methods of PathOp, this method accesses the file system.
GetInvalidFileNameChars | Returns an array of characters which are invalid in file name strings.
GetInvalidPathChars | Returns an array of characters which are invalid in path strings.
GetValidFileName | Returns a copy of the specified file name which has been cleared of all invalid path characters.
IsPathLocatedIn | Returns whether one path is a sub-path of another. Unlike most methods of PathOp, this method accesses the file system.
IsPathRooted | Determines whether the specified path begins with a file system root.
Top
Fields
Name | Description
AltDirectorySeparatorChar |
DirectorySeparatorChar |
ExtensionSeparatorChar |
VolumeSeparatorChar |
Top
See Also

Reference

Duality.IO Namespace


PathOp Fields

PathOp Fields

The PathOp type exposes the following members.

Fields
Name | Description
AltDirectorySeparatorChar |
DirectorySeparatorChar |
ExtensionSeparatorChar |
VolumeSeparatorChar |
Top
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.AltDirectorySeparatorChar Field

PathOpAltDirectorySeparatorChar Field

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly char AltDirectorySeparatorChar

Field Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.DirectorySeparatorChar Field

PathOpDirectorySeparatorChar Field

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly char DirectorySeparatorChar

Field Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.ExtensionSeparatorChar Field

PathOpExtensionSeparatorChar Field

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly char ExtensionSeparatorChar

Field Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.VolumeSeparatorChar Field

PathOpVolumeSeparatorChar Field

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly char VolumeSeparatorChar

Field Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp Methods

PathOp Methods

The PathOp type exposes the following members.

Methods
Name | Description
ArePathsEqual | Returns whether two paths are referring to the same file system entity. Unlike most methods of PathOp, this method accesses the file system.
Combine(String) | Concatenates any number of path strings.
Combine(String, String) | Concatenates two path strings.
GetDirectoryName | Determines the directory name component of a path, i.e. everything except the rightmost path element name.
GetExtension | Determines the extension of a file path.
GetFileName | Determines the file name component of a path, i.e. the rightmost path element name.
GetFileNameWithoutExtension | Similar to GetFileName(String), but also strips away the files extension.
GetFullPath | Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity. Unlike most methods of PathOp, this method accesses the file system.
GetInvalidFileNameChars | Returns an array of characters which are invalid in file name strings.
GetInvalidPathChars | Returns an array of characters which are invalid in path strings.
GetValidFileName | Returns a copy of the specified file name which has been cleared of all invalid path characters.
IsPathLocatedIn | Returns whether one path is a sub-path of another. Unlike most methods of PathOp, this method accesses the file system.
IsPathRooted | Determines whether the specified path begins with a file system root.
Top
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.ArePathsEqual Method

PathOpArePathsEqual Method
Returns whether two paths are referring to the same file system entity. Unlike most methods of PathOp, this method accesses the file system.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool ArePathsEqual(
    string firstPath,
    string secondPath
)

Parameters

firstPath
Type: SystemString
secondPath
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.Combine Method

PathOpCombine Method
Overload List
Name | Description
Combine(String) | Concatenates any number of path strings.
Combine(String, String) | Concatenates two path strings.
Top
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.Combine Method (String[])

PathOpCombine Method (String)
Concatenates any number of path strings.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Combine(
    params string[] paths
)

Parameters

paths
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Combine Overload
Duality.IO Namespace


PathOp.Combine Method (String, String)

PathOpCombine Method (String, String)
Concatenates two path strings.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string Combine(
    string first,
    string second
)

Parameters

first
Type: SystemString
second
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Combine Overload
Duality.IO Namespace


PathOp.GetDirectoryName Method

PathOpGetDirectoryName Method
Determines the directory name component of a path, i.e. everything except the rightmost path element name.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetDirectoryName(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetExtension Method

PathOpGetExtension Method
Determines the extension of a file path.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetExtension(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
The paths file extension, including the leading separator char. Returns an empty string, if no extension was found.
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetFileName Method

PathOpGetFileName Method
Determines the file name component of a path, i.e. the rightmost path element name.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFileName(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetFileNameWithoutExtension Method

PathOpGetFileNameWithoutExtension Method
Similar to GetFileName(String), but also strips away the files extension.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFileNameWithoutExtension(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetFullPath Method

PathOpGetFullPath Method
Returns a rooted version of the specified path, which uniquely identifies the referenced file system entity. Unlike most methods of PathOp, this method accesses the file system.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetFullPath(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetInvalidFileNameChars Method

PathOpGetInvalidFileNameChars Method
Returns an array of characters which are invalid in file name strings.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static char[] GetInvalidFileNameChars()

Return Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetInvalidPathChars Method

PathOpGetInvalidPathChars Method
Returns an array of characters which are invalid in path strings.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static char[] GetInvalidPathChars()

Return Value

Type: Char
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.GetValidFileName Method

PathOpGetValidFileName Method
Returns a copy of the specified file name which has been cleared of all invalid path characters.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string GetValidFileName(
    string fileName
)

Parameters

fileName
Type: SystemString

Return Value

Type: String
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.IsPathLocatedIn Method

PathOpIsPathLocatedIn Method
Returns whether one path is a sub-path of another. Unlike most methods of PathOp, this method accesses the file system.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsPathLocatedIn(
    string path,
    string baseDir
)

Parameters

path
Type: SystemString
The supposed sub-path.
baseDir
Type: SystemString
The (directory) path in which the supposed sub-path might be located in.

Return Value

Type: Boolean
True, if path is a sub-path of baseDir.
Examples
PathHelper.IsPathLocatedIn(@"C:\SomeDir\SubDir", @"C:\SomeDir") will return true.
See Also

Reference

PathOp Class
Duality.IO Namespace


PathOp.IsPathRooted Method

PathOpIsPathRooted Method
Determines whether the specified path begins with a file system root.

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsPathRooted(
    string path
)

Parameters

path
Type: SystemString

Return Value

Type: Boolean
See Also

Reference

PathOp Class
Duality.IO Namespace


StreamWrapper Class

StreamWrapper Class
Wraps a Stream within a new one, and forwards all functionality to the underlying Stream.
Inheritance Hierarchy
SystemObject
SystemMarshalByRefObject
System.IOStream
Duality.IOStreamWrapper
Duality.IONonClosingStreamWrapper

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class StreamWrapper : Stream

The StreamWrapper type exposes the following members.

Constructors
 | Name | Description
Public method | StreamWrapper | Initializes a new instance of the StreamWrapper class
Top
Methods
 | Name | Description
Protected method | Dispose | Releases the unmanaged resources used by the StreamWrapper and optionally releases the managed resources (Overrides StreamDispose(Boolean).)
Public method | Flush | (Overrides StreamFlush.)
Public method | Read | (Overrides StreamRead(Byte, Int32, Int32).)
Public method | ReadByte | (Overrides StreamReadByte.)
Public method | Seek | (Overrides StreamSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides StreamSetLength(Int64).)
Public method | Write | (Overrides StreamWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Overrides StreamWriteByte(Byte).)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
Properties
 | Name | Description
Public property | CanRead | (Overrides StreamCanRead.)
Public property | CanSeek | (Overrides StreamCanSeek.)
Public property | CanTimeout | (Overrides StreamCanTimeout.)
Public property | CanWrite | (Overrides StreamCanWrite.)
Public property | Length | (Overrides StreamLength.)
Public property | Position | (Overrides StreamPosition.)
Public property | ReadTimeout | (Overrides StreamReadTimeout.)
Public property | WriteTimeout | (Overrides StreamWriteTimeout.)
Top
See Also

Reference

Duality.IO Namespace


StreamWrapper Constructor

StreamWrapper Constructor
Initializes a new instance of the StreamWrapper class

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public StreamWrapper(
    Stream stream
)

Parameters

stream
Type: System.IOStream
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper Methods

StreamWrapper Methods

The StreamWrapper type exposes the following members.

Methods
 | Name | Description
Protected method | Dispose | (Overrides StreamDispose(Boolean).)
Public method | Flush | (Overrides StreamFlush.)
Public method | Read | (Overrides StreamRead(Byte, Int32, Int32).)
Public method | ReadByte | (Overrides StreamReadByte.)
Public method | Seek | (Overrides StreamSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides StreamSetLength(Int64).)
Public method | Write | (Overrides StreamWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Overrides StreamWriteByte(Byte).)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Dispose Method

StreamWrapperDispose Method
Releases the unmanaged resources used by the StreamWrapper and optionally releases the managed resources

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Dispose(
    bool disposing
)

Parameters

disposing
Type: SystemBoolean
True to release both managed and unmanaged resources; false to release only unmanaged resources
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Flush Method

StreamWrapperFlush Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Flush()
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Read Method

StreamWrapperRead Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int Read(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32

Return Value

Type: Int32
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.ReadByte Method

StreamWrapperReadByte Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int ReadByte()

Return Value

Type: Int32
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Seek Method

StreamWrapperSeek Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Seek(
    long offset,
    SeekOrigin origin
)

Parameters

offset
Type: SystemInt64
origin
Type: System.IOSeekOrigin

Return Value

Type: Int64
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.SetLength Method

StreamWrapperSetLength Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void SetLength(
    long value
)

Parameters

value
Type: SystemInt64
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Write Method

StreamWrapperWrite Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Write(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.WriteByte Method

StreamWrapperWriteByte Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteByte(
    byte value
)

Parameters

value
Type: SystemByte
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper Properties

StreamWrapper Properties

The StreamWrapper type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | (Overrides StreamCanRead.)
Public property | CanSeek | (Overrides StreamCanSeek.)
Public property | CanTimeout | (Overrides StreamCanTimeout.)
Public property | CanWrite | (Overrides StreamCanWrite.)
Public property | Length | (Overrides StreamLength.)
Public property | Position | (Overrides StreamPosition.)
Public property | ReadTimeout | (Overrides StreamReadTimeout.)
Public property | WriteTimeout | (Overrides StreamWriteTimeout.)
Top
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.CanRead Property

StreamWrapperCanRead Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanRead { get; }

Property Value

Type: Boolean
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.CanSeek Property

StreamWrapperCanSeek Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanSeek { get; }

Property Value

Type: Boolean
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.CanTimeout Property

StreamWrapperCanTimeout Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanTimeout { get; }

Property Value

Type: Boolean
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.CanWrite Property

StreamWrapperCanWrite Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanWrite { get; }

Property Value

Type: Boolean
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Length Property

StreamWrapperLength Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Length { get; }

Property Value

Type: Int64
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.Position Property

StreamWrapperPosition Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Position { get; set; }

Property Value

Type: Int64
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.ReadTimeout Property

StreamWrapperReadTimeout Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int ReadTimeout { get; set; }

Property Value

Type: Int32
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


StreamWrapper.WriteTimeout Property

StreamWrapperWriteTimeout Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int WriteTimeout { get; set; }

Property Value

Type: Int32
See Also

Reference

StreamWrapper Class
Duality.IO Namespace


SubStreamWrapper Class

SubStreamWrapper Class
Wraps a Stream inside a proxy that allows accessing only a certain portion of the Stream, beginning a its current Position. Using internal buffering, the SubStream allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the SubStream will not close its underlying Stream.
Inheritance Hierarchy
SystemObject
SystemMarshalByRefObject
System.IOStream
Duality.IOStreamWrapper
Duality.IONonClosingStreamWrapper
Duality.IOSubStreamWrapper

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class SubStreamWrapper : NonClosingStreamWrapper

The SubStreamWrapper type exposes the following members.

Constructors
 | Name | Description
Public method | SubStreamWrapper | Initializes a new instance of the SubStreamWrapper class
Top
Methods
 | Name | Description
Protected method | Dispose | Releases the unmanaged resources used by the SubStreamWrapper and optionally releases the managed resources (Overrides NonClosingStreamWrapperDispose(Boolean).)
Public method | Flush | (Inherited from NonClosingStreamWrapper.)
Public method | Read | (Overrides NonClosingStreamWrapperRead(Byte, Int32, Int32).)
Public method | ReadByte | (Inherited from NonClosingStreamWrapper.)
Public method | Seek | (Overrides NonClosingStreamWrapperSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides NonClosingStreamWrapperSetLength(Int64).)
Public method | Write | (Overrides NonClosingStreamWrapperWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Inherited from NonClosingStreamWrapper.)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
Properties
 | Name | Description
Public property | CanRead | (Inherited from NonClosingStreamWrapper.)
Public property | CanSeek | (Overrides NonClosingStreamWrapperCanSeek.)
Public property | CanTimeout | (Inherited from NonClosingStreamWrapper.)
Public property | CanWrite | (Overrides NonClosingStreamWrapperCanWrite.)
Public property | Length | (Overrides NonClosingStreamWrapperLength.)
Public property | Position | (Overrides NonClosingStreamWrapperPosition.)
Public property | ReadTimeout | (Inherited from StreamWrapper.)
Public property | WriteTimeout | (Inherited from StreamWrapper.)
Top
See Also

Reference

Duality.IO Namespace


SubStreamWrapper Constructor

SubStreamWrapper Constructor
Initializes a new instance of the SubStreamWrapper class

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SubStreamWrapper(
    Stream stream,
    long maxLength = -1
)

Parameters

stream
Type: System.IOStream
maxLength (Optional)
Type: SystemInt64
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper Methods

SubStreamWrapper Methods

The SubStreamWrapper type exposes the following members.

Methods
 | Name | Description
Protected method | Dispose | (Overrides NonClosingStreamWrapperDispose(Boolean).)
Public method | Flush | (Inherited from NonClosingStreamWrapper.)
Public method | Read | (Overrides NonClosingStreamWrapperRead(Byte, Int32, Int32).)
Public method | ReadByte | (Inherited from NonClosingStreamWrapper.)
Public method | Seek | (Overrides NonClosingStreamWrapperSeek(Int64, SeekOrigin).)
Public method | SetLength | (Overrides NonClosingStreamWrapperSetLength(Int64).)
Public method | Write | (Overrides NonClosingStreamWrapperWrite(Byte, Int32, Int32).)
Public method | WriteByte | (Inherited from NonClosingStreamWrapper.)
Top
Extension Methods
 | Name | Description
Public Extension Method | NonClosing | Wraps the Stream inside a proxy that won't close the underlying stream when being closed. (Defined by ExtMethodsStream.)
Public Extension Method | SubStream | Wraps the Stream inside a proxy that allows accessing only a certain subsection of the Stream, beginning a its current Position. The SubStreamWrapper allows seeking and rewinding back to its original Position, even if the underlying Stream doesn't. Closing the sub-Stream will not close the underlying base Stream. (Defined by ExtMethodsStream.)
Top
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Dispose Method

SubStreamWrapperDispose Method
Releases the unmanaged resources used by the SubStreamWrapper and optionally releases the managed resources

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Dispose(
    bool disposing
)

Parameters

disposing
Type: SystemBoolean
True to release both managed and unmanaged resources; false to release only unmanaged resources
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Read Method

SubStreamWrapperRead Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override int Read(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32

Return Value

Type: Int32
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Seek Method

SubStreamWrapperSeek Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Seek(
    long offset,
    SeekOrigin origin
)

Parameters

offset
Type: SystemInt64
origin
Type: System.IOSeekOrigin

Return Value

Type: Int64
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.SetLength Method

SubStreamWrapperSetLength Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void SetLength(
    long value
)

Parameters

value
Type: SystemInt64
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Write Method

SubStreamWrapperWrite Method

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void Write(
    byte[] buffer,
    int offset,
    int count
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper Properties

SubStreamWrapper Properties

The SubStreamWrapper type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | (Inherited from NonClosingStreamWrapper.)
Public property | CanSeek | (Overrides NonClosingStreamWrapperCanSeek.)
Public property | CanTimeout | (Inherited from NonClosingStreamWrapper.)
Public property | CanWrite | (Overrides NonClosingStreamWrapperCanWrite.)
Public property | Length | (Overrides NonClosingStreamWrapperLength.)
Public property | Position | (Overrides NonClosingStreamWrapperPosition.)
Public property | ReadTimeout | (Inherited from StreamWrapper.)
Public property | WriteTimeout | (Inherited from StreamWrapper.)
Top
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.CanSeek Property

SubStreamWrapperCanSeek Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanSeek { get; }

Property Value

Type: Boolean
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.CanWrite Property

SubStreamWrapperCanWrite Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool CanWrite { get; }

Property Value

Type: Boolean
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Length Property

SubStreamWrapperLength Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Length { get; }

Property Value

Type: Int64
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


SubStreamWrapper.Position Property

SubStreamWrapperPosition Property

Namespace: Duality.IO
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override long Position { get; set; }

Property Value

Type: Int64
See Also

Reference

SubStreamWrapper Class
Duality.IO Namespace


Duality.Properties Namespace

Duality.Properties Namespace
Classes
 | Class | Description
Public class | CoreResNames | This static class contains constant string representations of certain resource names.


CoreResNames Class

CoreResNames Class
This static class contains constant string representations of certain resource names.
Inheritance Hierarchy
SystemObject
Duality.PropertiesCoreResNames

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class CoreResNames

The CoreResNames type exposes the following members.

Fields
Name | Description
CategoryAI |
CategoryDiagnostics |
CategoryGraphics |
CategoryNone |
CategoryPhysics |
CategorySound |
ImageAnimSpriteRenderer |
ImageArrayNode |
ImageAudioData |
ImageBinarySerializer |
ImageCamera |
ImageComponent |
ImageDataNode |
ImageDelegateNode |
ImageDrawTechnique |
ImageFont |
ImageFragmentShader |
ImageGameObject |
ImageMaterial |
ImageMemberInfoNode |
ImageObjectRefNode |
ImagePixmap |
ImagePrefab |
ImageProfileRenderer |
ImageRenderTarget |
ImageResource |
ImageRigidBody |
ImageRigidBodyRenderer |
ImageScene |
ImageShaderProgram |
ImageSound |
ImageSoundEmitter |
ImageSoundListener |
ImageSpriteRenderer |
ImageStructNode |
ImageTextRenderer |
ImageTexture |
ImageTransform |
ImageTypeDataLayoutNode |
ImageVertexShader |
ImageXmlSerializer |
Top
See Also

Reference

Duality.Properties Namespace


CoreResNames Fields

CoreResNames Fields

The CoreResNames type exposes the following members.

Fields
Name | Description
CategoryAI |
CategoryDiagnostics |
CategoryGraphics |
CategoryNone |
CategoryPhysics |
CategorySound |
ImageAnimSpriteRenderer |
ImageArrayNode |
ImageAudioData |
ImageBinarySerializer |
ImageCamera |
ImageComponent |
ImageDataNode |
ImageDelegateNode |
ImageDrawTechnique |
ImageFont |
ImageFragmentShader |
ImageGameObject |
ImageMaterial |
ImageMemberInfoNode |
ImageObjectRefNode |
ImagePixmap |
ImagePrefab |
ImageProfileRenderer |
ImageRenderTarget |
ImageResource |
ImageRigidBody |
ImageRigidBodyRenderer |
ImageScene |
ImageShaderProgram |
ImageSound |
ImageSoundEmitter |
ImageSoundListener |
ImageSpriteRenderer |
ImageStructNode |
ImageTextRenderer |
ImageTexture |
ImageTransform |
ImageTypeDataLayoutNode |
ImageVertexShader |
ImageXmlSerializer |
Top
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategoryAI Field

CoreResNamesCategoryAI Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategoryAI

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategoryDiagnostics Field

CoreResNamesCategoryDiagnostics Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategoryDiagnostics

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategoryGraphics Field

CoreResNamesCategoryGraphics Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategoryGraphics

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategoryNone Field

CoreResNamesCategoryNone Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategoryNone

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategoryPhysics Field

CoreResNamesCategoryPhysics Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategoryPhysics

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.CategorySound Field

CoreResNamesCategorySound Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string CategorySound

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageAnimSpriteRenderer Field

CoreResNamesImageAnimSpriteRenderer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageAnimSpriteRenderer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageArrayNode Field

CoreResNamesImageArrayNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageArrayNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageAudioData Field

CoreResNamesImageAudioData Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageAudioData

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageBinarySerializer Field

CoreResNamesImageBinarySerializer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageBinarySerializer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageCamera Field

CoreResNamesImageCamera Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageCamera

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageComponent Field

CoreResNamesImageComponent Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageComponent

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageDataNode Field

CoreResNamesImageDataNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageDataNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageDelegateNode Field

CoreResNamesImageDelegateNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageDelegateNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageDrawTechnique Field

CoreResNamesImageDrawTechnique Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageDrawTechnique

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageFont Field

CoreResNamesImageFont Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageFont

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageFragmentShader Field

CoreResNamesImageFragmentShader Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageFragmentShader

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageGameObject Field

CoreResNamesImageGameObject Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageGameObject

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageMaterial Field

CoreResNamesImageMaterial Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageMaterial

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageMemberInfoNode Field

CoreResNamesImageMemberInfoNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageMemberInfoNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageObjectRefNode Field

CoreResNamesImageObjectRefNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageObjectRefNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImagePixmap Field

CoreResNamesImagePixmap Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImagePixmap

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImagePrefab Field

CoreResNamesImagePrefab Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImagePrefab

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageProfileRenderer Field

CoreResNamesImageProfileRenderer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageProfileRenderer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageRenderTarget Field

CoreResNamesImageRenderTarget Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageRenderTarget

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageResource Field

CoreResNamesImageResource Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageResource

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageRigidBody Field

CoreResNamesImageRigidBody Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageRigidBody

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageRigidBodyRenderer Field

CoreResNamesImageRigidBodyRenderer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageRigidBodyRenderer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageScene Field

CoreResNamesImageScene Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageScene

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageShaderProgram Field

CoreResNamesImageShaderProgram Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageShaderProgram

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageSound Field

CoreResNamesImageSound Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageSound

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageSoundEmitter Field

CoreResNamesImageSoundEmitter Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageSoundEmitter

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageSoundListener Field

CoreResNamesImageSoundListener Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageSoundListener

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageSpriteRenderer Field

CoreResNamesImageSpriteRenderer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageSpriteRenderer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageStructNode Field

CoreResNamesImageStructNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageStructNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageTextRenderer Field

CoreResNamesImageTextRenderer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageTextRenderer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageTexture Field

CoreResNamesImageTexture Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageTexture

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageTransform Field

CoreResNamesImageTransform Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageTransform

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageTypeDataLayoutNode Field

CoreResNamesImageTypeDataLayoutNode Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageTypeDataLayoutNode

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageVertexShader Field

CoreResNamesImageVertexShader Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageVertexShader

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


CoreResNames.ImageXmlSerializer Field

CoreResNamesImageXmlSerializer Field

Namespace: Duality.Properties
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string ImageXmlSerializer

Field Value

Type: String
See Also

Reference

CoreResNames Class
Duality.Properties Namespace


Duality.Resources Namespace

Duality.Resources Namespace
Classes
 | Class | Description
Public class | AbstractShader | Represents an OpenGL Shader in an abstract form.
Public class | ApplyPrefabContext |
Public class | AudioData | Stores compressed audio data (Ogg Vorbis) in system memory as well as a reference to the OpenAL buffer containing actual PCM data, once set up. The OpenAL buffer is set up lazy i.e. as soon as demanded by accessing the AlBuffer property or calling SetupAlBuffer.
Public class | BuiltinShaderFields | Manages Duality's builtin shader variables.
Public class | DrawTechnique | DrawTechniques represent the method by which a set of colors, Textures and vertex data is applied to screen.
Public class | ExtMethodsShaderVarType |
Public class | Font | Represents a font. While any system font or imported TrueType font can be used, they are internally pre-rasterized and stored in a Texture with an Atlas.
Public class | FontCharSet | Represents a character set that defines which glyphs are available in a Font Resource.
Public class | FontMetrics | Provides information about the shape and size of a Font. This information is not specific to a certain text or glyph.
Public class | FragmentShader | Represents an OpenGL FragmentShader.
Public class | Material | Materials are standardized BatchInfos, stored as a Resource. Just like BatchInfo objects, they describe how an object, represented by a set of vertices, looks like. Using Materials is generally more performant than using BatchInfos but not always reasonable, for example when there is a single, unique GameObject with a special appearance: This is a typical BatchInfo case.
Public class | Pixmap | A Pixmap stores pixel data in system memory.
Public class | Prefab | Prefab is short for "prefabricated object" and encapsulates a single GameObject that can serve as a template. When creating a GameObject out of a Prefab, it maintains a connection to it using a PrefabLink object. This ensures that changes made to the Prefab propagate to all of its instances as well. It also keeps track of Properties that have been deliberately modified in the editor and restores them after re-applying the original Prefabs data.
Public class | PrefabLink | Represents a GameObjects connection to the Prefab it has been instanciated from.
Public class | RenderTarget | Instead of rendering to screen, RenderTargets can serve as an alternative drawing surface for a Camera. The image is applied to one or several Textures. By default, only the first attached Texture is actually used, but you can use a custom FragmentShader to use all available Textures for storing information.
Public class | Scene | A Scene encapsulates an organized set of GameObjects and provides update-, rendering- and maintenance functionality. In Duality, there is always exactly one Scene Current which represents a level, gamestate or a combination of both, depending on you own design.
Public class | ShaderProgram | Represents an OpenGL ShaderProgram which consists of a Vertex- and a FragmentShader
 | Sound | A Sound is parameterized AudioData. Note that a Sound Resource does not contain any kind of audio data by itsself.
Public class | Texture | A Texture refers to pixel data stored in video memory
Public class | VertexShader | Represents an OpenGL VertexShader.
Structures
 | Structure | Description
Public structure | FontGlyphData | Contains data about a single glyph.
Public structure | ShaderFieldInfo | Provides information about a shader variable.
Enumerations
 | Enumeration | Description
Public enumeration | FontRenderMode | Specifies how a Font is rendered. This affects both internal glyph rasterization and rendering.
Public enumeration | ShaderFieldScope | The scope of a shader variable
Public enumeration | ShaderFieldType | The type of a shader variable.
Public enumeration | ShaderType |


AbstractShader Class

AbstractShader Class
Represents an OpenGL Shader in an abstract form.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesAbstractShader
Duality.ResourcesFragmentShader
Duality.ResourcesVertexShader

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class AbstractShader : Resource

The AbstractShader type exposes the following members.

Constructors
 | Name | Description
Protected method | AbstractShader | Initializes a new instance of the AbstractShader class
Protected method | AbstractShader(String) | Initializes a new instance of the AbstractShader class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Source | [GET] The shaders source code.
Protected property | Type | The type of OpenGL shader that is represented.
Top
See Also

Reference

Duality.Resources Namespace


AbstractShader Constructor

AbstractShader Constructor
Overload List
 | Name | Description
Protected method | AbstractShader | Initializes a new instance of the AbstractShader class
Protected method | AbstractShader(String) | Initializes a new instance of the AbstractShader class
Top
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader Constructor

AbstractShader Constructor
Initializes a new instance of the AbstractShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected AbstractShader()
See Also

Reference

AbstractShader Class
AbstractShader Overload
Duality.Resources Namespace


AbstractShader Constructor (String)

AbstractShader Constructor (String)
Initializes a new instance of the AbstractShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected AbstractShader(
    string sourceCode
)

Parameters

sourceCode
Type: SystemString
See Also

Reference

AbstractShader Class
AbstractShader Overload
Duality.Resources Namespace


AbstractShader Fields

AbstractShader Fields

The AbstractShader type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader Methods

AbstractShader Methods

The AbstractShader type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.Compile Method

AbstractShaderCompile Method
Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Compile()
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.OnCopyDataTo Method

AbstractShaderOnCopyDataTo Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.OnDisposing Method

AbstractShaderOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.OnLoaded Method

AbstractShaderOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader Properties

AbstractShader Properties

The AbstractShader type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Source | [GET] The shaders source code.
Protected property | Type | The type of OpenGL shader that is represented.
Top
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.Compiled Property

AbstractShaderCompiled Property
[GET] Whether this shader has been compiled yet or not.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Compiled { get; }

Property Value

Type: Boolean
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.Native Property

AbstractShaderNative Property
[GET] The shaders native backend. Don't use this unless you know exactly what you're doing.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeShaderPart Native { get; }

Property Value

Type: INativeShaderPart
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.Source Property

AbstractShaderSource Property
[GET] The shaders source code.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Source { get; set; }

Property Value

Type: String
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


AbstractShader.Type Property

AbstractShaderType Property
The type of OpenGL shader that is represented.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract ShaderType Type { get; }

Property Value

Type: ShaderType
See Also

Reference

AbstractShader Class
Duality.Resources Namespace


ApplyPrefabContext Class

ApplyPrefabContext Class
Inheritance Hierarchy
SystemObject
Duality.CloningCloneProviderContext
Duality.ResourcesApplyPrefabContext

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ApplyPrefabContext : CloneProviderContext

The ApplyPrefabContext type exposes the following members.

Constructors
 | Name | Description
Public method | ApplyPrefabContext | Initializes a new instance of the ApplyPrefabContext class
Top
Fields
 | Name | Description
Protected field | preserveIdentity | (Inherited from CloneProviderContext.)
Top
Properties
 | Name | Description
Public property | PreserveIdentity | [GET] Should the operation preserve each objects identity? If false, specific identity-preserving data field such as Guid or Id fields will be copied as well. This might result in duplicate IDs. (Inherited from CloneProviderContext.)
Top
See Also

Reference

Duality.Resources Namespace


ApplyPrefabContext Constructor

ApplyPrefabContext Constructor
Initializes a new instance of the ApplyPrefabContext class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ApplyPrefabContext()
See Also

Reference

ApplyPrefabContext Class
Duality.Resources Namespace


ApplyPrefabContext Fields

ApplyPrefabContext Fields

The ApplyPrefabContext type exposes the following members.

Fields
 | Name | Description
Protected field | preserveIdentity | (Inherited from CloneProviderContext.)
Top
See Also

Reference

ApplyPrefabContext Class
Duality.Resources Namespace


ApplyPrefabContext Properties

ApplyPrefabContext Properties

The ApplyPrefabContext type exposes the following members.

Properties
 | Name | Description
Public property | PreserveIdentity | [GET] Should the operation preserve each objects identity? If false, specific identity-preserving data field such as Guid or Id fields will be copied as well. This might result in duplicate IDs. (Inherited from CloneProviderContext.)
Top
See Also

Reference

ApplyPrefabContext Class
Duality.Resources Namespace


AudioData Class

AudioData Class
Stores compressed audio data (Ogg Vorbis) in system memory as well as a reference to the OpenAL buffer containing actual PCM data, once set up. The OpenAL buffer is set up lazy i.e. as soon as demanded by accessing the AlBuffer property or calling SetupAlBuffer.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesAudioData

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AudioData : Resource

The AudioData type exposes the following members.

Constructors
 | Name | Description
Public method | AudioData | Creates a new, empty AudioData without any data.
Public method | AudioData(Byte) | Creates a new AudioData based on an Ogg Vorbis memory chunk.
Public method | AudioData(Stream) | Creates a new AudioData based on a Stream containing Ogg Vorbis data.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Beep | [GET] A simple beep AudioData.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | ForceStream | [GET / SET] If set to true, when playing a Sound that refers to this AudioData, it is forced to be played streamed. Normally, streaming kicks in automatically when playing very large sound files, such as music or large environmental ambience.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | IsStreamed | [GET] Returns whether this AudioData will be played streamed.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native audio buffer representation. Don't use this unless you know exactly what you're doing.
Public property | OggVorbisData | [GET / SET] A data chunk representing Ogg Vorbis compressed audio data.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesSound


AudioData Constructor

AudioData Constructor
Overload List
 | Name | Description
Public method | AudioData | Creates a new, empty AudioData without any data.
Public method | AudioData(Byte) | Creates a new AudioData based on an Ogg Vorbis memory chunk.
Public method | AudioData(Stream) | Creates a new AudioData based on a Stream containing Ogg Vorbis data.
Top
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData Constructor

AudioData Constructor
Creates a new, empty AudioData without any data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AudioData()
See Also

Reference

AudioData Class
AudioData Overload
Duality.Resources Namespace


AudioData Constructor (Byte[])

AudioData Constructor (Byte)
Creates a new AudioData based on an Ogg Vorbis memory chunk.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AudioData(
    byte[] oggVorbisData
)

Parameters

oggVorbisData
Type: SystemByte
An Ogg Vorbis memory chunk
See Also

Reference

AudioData Class
AudioData Overload
Duality.Resources Namespace


AudioData Constructor (Stream)

AudioData Constructor (Stream)
Creates a new AudioData based on a Stream containing Ogg Vorbis data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AudioData(
    Stream oggVorbisDataStream
)

Parameters

oggVorbisDataStream
Type: System.IOStream
A Stream containing Ogg Vorbis data
See Also

Reference

AudioData Class
AudioData Overload
Duality.Resources Namespace


AudioData Fields

AudioData Fields

The AudioData type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData Methods

AudioData Methods

The AudioData type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.OnDisposing Method

AudioDataOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.OnLoaded Method

AudioDataOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData Properties

AudioData Properties

The AudioData type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Beep | [GET] A simple beep AudioData.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | ForceStream | [GET / SET] If set to true, when playing a Sound that refers to this AudioData, it is forced to be played streamed. Normally, streaming kicks in automatically when playing very large sound files, such as music or large environmental ambience.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | IsStreamed | [GET] Returns whether this AudioData will be played streamed.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native audio buffer representation. Don't use this unless you know exactly what you're doing.
Public property | OggVorbisData | [GET / SET] A data chunk representing Ogg Vorbis compressed audio data.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Top
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.Beep Property

AudioDataBeep Property
[GET] A simple beep AudioData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<AudioData> Beep { get; }

Property Value

Type: ContentRef AudioData
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.ForceStream Property

AudioDataForceStream Property
[GET / SET] If set to true, when playing a Sound that refers to this AudioData, it is forced to be played streamed. Normally, streaming kicks in automatically when playing very large sound files, such as music or large environmental ambience.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ForceStream { get; set; }

Property Value

Type: Boolean
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.IsStreamed Property

AudioDataIsStreamed Property
[GET] Returns whether this AudioData will be played streamed.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsStreamed { get; }

Property Value

Type: Boolean
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.Native Property

AudioDataNative Property
[GET] The backends native audio buffer representation. Don't use this unless you know exactly what you're doing.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeAudioBuffer Native { get; }

Property Value

Type: INativeAudioBuffer
See Also

Reference

AudioData Class
Duality.Resources Namespace


AudioData.OggVorbisData Property

AudioDataOggVorbisData Property
[GET / SET] A data chunk representing Ogg Vorbis compressed audio data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public byte[] OggVorbisData { get; set; }

Property Value

Type: Byte
See Also

Reference

AudioData Class
Duality.Resources Namespace


BuiltinShaderFields Class

BuiltinShaderFields Class
Manages Duality's builtin shader variables.
Inheritance Hierarchy
SystemObject
Duality.ResourcesBuiltinShaderFields

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class BuiltinShaderFields

The BuiltinShaderFields type exposes the following members.

Methods
Name | Description
GetIndex | Determines whether a certain ShaderFieldInfo name refers to a builtin shader variable and returns a unique index to retrieve that variables value.
TryGetValue | Retrieves the value of a builtin shader variable using the index retrieved by GetIndex(String).
Top
Fields
Name | Description
InvalidIndex |
Top
See Also

Reference

Duality.Resources Namespace


BuiltinShaderFields Fields

BuiltinShaderFields Fields

The BuiltinShaderFields type exposes the following members.

Fields
Name | Description
InvalidIndex |
Top
See Also

Reference

BuiltinShaderFields Class
Duality.Resources Namespace


BuiltinShaderFields.InvalidIndex Field

BuiltinShaderFieldsInvalidIndex Field

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const int InvalidIndex

Field Value

Type: Int32
See Also

Reference

BuiltinShaderFields Class
Duality.Resources Namespace


BuiltinShaderFields Methods

BuiltinShaderFields Methods

The BuiltinShaderFields type exposes the following members.

Methods
Name | Description
GetIndex | Determines whether a certain ShaderFieldInfo name refers to a builtin shader variable and returns a unique index to retrieve that variables value.
TryGetValue | Retrieves the value of a builtin shader variable using the index retrieved by GetIndex(String).
Top
See Also

Reference

BuiltinShaderFields Class
Duality.Resources Namespace


BuiltinShaderFields.GetIndex Method

BuiltinShaderFieldsGetIndex Method
Determines whether a certain ShaderFieldInfo name refers to a builtin shader variable and returns a unique index to retrieve that variables value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetIndex(
    string fieldName
)

Parameters

fieldName
Type: SystemString

Return Value

Type: Int32
See Also

Reference

BuiltinShaderFields Class
Duality.Resources Namespace


BuiltinShaderFields.TryGetValue Method

BuiltinShaderFieldsTryGetValue Method
Retrieves the value of a builtin shader variable using the index retrieved by GetIndex(String).

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool TryGetValue(
    IDrawDevice currentDevice,
    int index,
    ref float[] value
)

Parameters

currentDevice
Type: Duality.DrawingIDrawDevice
index
Type: SystemInt32
value
Type: SystemSingle

Return Value

Type: Boolean
See Also

Reference

BuiltinShaderFields Class
Duality.Resources Namespace


DrawTechnique Class

DrawTechnique Class
DrawTechniques represent the method by which a set of colors, Textures and vertex data is applied to screen.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesDrawTechnique

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DrawTechnique : Resource

The DrawTechnique type exposes the following members.

Constructors
 | Name | Description
Public method | DrawTechnique | Creates a new, default DrawTechnique
Public method | DrawTechnique(BlendMode) | Creates a new DrawTechnique that uses the specified BlendMode.
Public method | DrawTechnique(BlendMode, ContentRefShaderProgram, VertexDeclaration) | Creates a new DrawTechnique using the specified BlendMode and ShaderProgram.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | PrepareRendering | Prepares rendering using this DrawTechnique.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
 | Add | Renders additive geometry. Ideal for glow effects.
 | Alpha | Renders geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Blending | [GET / SET] Specifies how incoming color values interact with the existing background color.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
 | Invert | Renders geometry inverting the background color.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Light | Renders geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.
 | Mask | Renders alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.
 | Multiply | Renders geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | NeedsPreparation | [GET] Returns whether this DrawTechnique requires any rendering preparation. This is false for all standard DrawTechniques, but may return true when deriving custom DrawTechniques.
Public property | NeedsZSort | [GET] Returns whether this DrawTechnique requires z sorting. It is derived from its Blending.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | Renders geometry for a picking operation. This isn't used for regular rendering.
Public property | PreferredVertexFormat | [GET / SET] The vertex format that is preferred by this DrawTechnique. If there is no specific preference, null is returned.
Public property | Shader | [GET / SET] The ShaderProgram that is used for rendering.
 | SharpAlpha | Renders geometry using the alpha channel, but enforces sharp edges by using an adaptive antialiazing shader. This is the recommended DrawTechnique for rendering text or stencil sprites.
 | SmoothAnim_Add | Renders SmoothAnim additive geometry. Ideal for glow effects.
 | SmoothAnim_Alpha | Renders SmoothAnim geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.
 | SmoothAnim_Invert | Renders SmoothAnim geometry inverting the background color.
 | SmoothAnim_Light | Renders SmoothAnim geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.
 | SmoothAnim_Mask | Renders SmoothAnim alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.
 | SmoothAnim_Multiply | Renders SmoothAnim geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.
 | SmoothAnim_Solid | Renders SmoothAnim solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.
 | Solid | Renders solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesMaterial
Duality.ResourcesShaderProgram
Duality.DrawingBlendMode


DrawTechnique Constructor

DrawTechnique Constructor
Overload List
 | Name | Description
Public method | DrawTechnique | Creates a new, default DrawTechnique
Public method | DrawTechnique(BlendMode) | Creates a new DrawTechnique that uses the specified BlendMode.
Public method | DrawTechnique(BlendMode, ContentRefShaderProgram, VertexDeclaration) | Creates a new DrawTechnique using the specified BlendMode and ShaderProgram.
Top
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique Constructor

DrawTechnique Constructor
Creates a new, default DrawTechnique

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DrawTechnique()
See Also

Reference

DrawTechnique Class
DrawTechnique Overload
Duality.Resources Namespace


DrawTechnique Constructor (BlendMode)

DrawTechnique Constructor (BlendMode)
Creates a new DrawTechnique that uses the specified BlendMode.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DrawTechnique(
    BlendMode blendType
)

Parameters

blendType
Type: Duality.DrawingBlendMode
See Also

Reference

DrawTechnique Class
DrawTechnique Overload
Duality.Resources Namespace


DrawTechnique Constructor (BlendMode, ContentRef(ShaderProgram), VertexDeclaration)

DrawTechnique Constructor (BlendMode, ContentRefShaderProgram, VertexDeclaration)
Creates a new DrawTechnique using the specified BlendMode and ShaderProgram.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DrawTechnique(
    BlendMode blendType,
    ContentRef<ShaderProgram> shader,
    VertexDeclaration formatPref = null
)

Parameters

blendType
Type: Duality.DrawingBlendMode
shader
Type: DualityContentRef ShaderProgram
formatPref (Optional)
Type: Duality.DrawingVertexDeclaration
See Also

Reference

DrawTechnique Class
DrawTechnique Overload
Duality.Resources Namespace


DrawTechnique Fields

DrawTechnique Fields

The DrawTechnique type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique Methods

DrawTechnique Methods

The DrawTechnique type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | PrepareRendering | Prepares rendering using this DrawTechnique.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.OnLoaded Method

DrawTechniqueOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.PrepareRendering Method

DrawTechniquePrepareRendering Method
Prepares rendering using this DrawTechnique.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void PrepareRendering(
    IDrawDevice device,
    BatchInfo material
)

Parameters

device
Type: Duality.DrawingIDrawDevice
material
Type: Duality.DrawingBatchInfo
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique Properties

DrawTechnique Properties

The DrawTechnique type exposes the following members.

Properties
 | Name | Description
 | Add | Renders additive geometry. Ideal for glow effects.
 | Alpha | Renders geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Blending | [GET / SET] Specifies how incoming color values interact with the existing background color.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
 | Invert | Renders geometry inverting the background color.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Light | Renders geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.
 | Mask | Renders alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.
 | Multiply | Renders geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | NeedsPreparation | [GET] Returns whether this DrawTechnique requires any rendering preparation. This is false for all standard DrawTechniques, but may return true when deriving custom DrawTechniques.
Public property | NeedsZSort | [GET] Returns whether this DrawTechnique requires z sorting. It is derived from its Blending.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | Renders geometry for a picking operation. This isn't used for regular rendering.
Public property | PreferredVertexFormat | [GET / SET] The vertex format that is preferred by this DrawTechnique. If there is no specific preference, null is returned.
Public property | Shader | [GET / SET] The ShaderProgram that is used for rendering.
 | SharpAlpha | Renders geometry using the alpha channel, but enforces sharp edges by using an adaptive antialiazing shader. This is the recommended DrawTechnique for rendering text or stencil sprites.
 | SmoothAnim_Add | Renders SmoothAnim additive geometry. Ideal for glow effects.
 | SmoothAnim_Alpha | Renders SmoothAnim geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.
 | SmoothAnim_Invert | Renders SmoothAnim geometry inverting the background color.
 | SmoothAnim_Light | Renders SmoothAnim geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.
 | SmoothAnim_Mask | Renders SmoothAnim alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.
 | SmoothAnim_Multiply | Renders SmoothAnim geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.
 | SmoothAnim_Solid | Renders SmoothAnim solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.
 | Solid | Renders solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.
Top
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Add Property

DrawTechniqueAdd Property
Renders additive geometry. Ideal for glow effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Add { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Alpha Property

DrawTechniqueAlpha Property
Renders geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Alpha { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Blending Property

DrawTechniqueBlending Property
[GET / SET] Specifies how incoming color values interact with the existing background color.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BlendMode Blending { get; set; }

Property Value

Type: BlendMode
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Invert Property

DrawTechniqueInvert Property
Renders geometry inverting the background color.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Invert { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Light Property

DrawTechniqueLight Property
Renders geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Light { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Mask Property

DrawTechniqueMask Property
Renders alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Mask { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Multiply Property

DrawTechniqueMultiply Property
Renders geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Multiply { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.NeedsPreparation Property

DrawTechniqueNeedsPreparation Property
[GET] Returns whether this DrawTechnique requires any rendering preparation. This is false for all standard DrawTechniques, but may return true when deriving custom DrawTechniques.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool NeedsPreparation { get; }

Property Value

Type: Boolean
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.NeedsZSort Property

DrawTechniqueNeedsZSort Property
[GET] Returns whether this DrawTechnique requires z sorting. It is derived from its Blending.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool NeedsZSort { get; }

Property Value

Type: Boolean
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Picking Property

DrawTechniquePicking Property
Renders geometry for a picking operation. This isn't used for regular rendering.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Picking { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.PreferredVertexFormat Property

DrawTechniquePreferredVertexFormat Property
[GET / SET] The vertex format that is preferred by this DrawTechnique. If there is no specific preference, null is returned.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexDeclaration PreferredVertexFormat { get; set; }

Property Value

Type: VertexDeclaration
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Shader Property

DrawTechniqueShader Property
[GET / SET] The ShaderProgram that is used for rendering.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<ShaderProgram> Shader { get; set; }

Property Value

Type: ContentRef ShaderProgram
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SharpAlpha Property

DrawTechniqueSharpAlpha Property
Renders geometry using the alpha channel, but enforces sharp edges by using an adaptive antialiazing shader. This is the recommended DrawTechnique for rendering text or stencil sprites.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SharpAlpha { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Add Property

DrawTechniqueSmoothAnim_Add Property
Renders SmoothAnim additive geometry. Ideal for glow effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Add { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Alpha Property

DrawTechniqueSmoothAnim_Alpha Property
Renders SmoothAnim geometry and using the alpha channel. However, for stencil-sharp alpha edges, Mask might be sufficient and is a lot faster. Consider using it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Alpha { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Invert Property

DrawTechniqueSmoothAnim_Invert Property
Renders SmoothAnim geometry inverting the background color.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Invert { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Light Property

DrawTechniqueSmoothAnim_Light Property
Renders SmoothAnim geometry adding incoming color values weighted based on the existing background. Can be used for lighting effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Light { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Mask Property

DrawTechniqueSmoothAnim_Mask Property
Renders SmoothAnim alpha-masked solid geometry. This is the recommended DrawTechnique for regular sprite rendering. If multisampling is available, it is utilized to smooth masked edges.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Mask { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Multiply Property

DrawTechniqueSmoothAnim_Multiply Property
Renders SmoothAnim geometry multiplying the existing background with incoming color values. Can be used for shadowing effects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Multiply { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.SmoothAnim_Solid Property

DrawTechniqueSmoothAnim_Solid Property
Renders SmoothAnim solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> SmoothAnim_Solid { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


DrawTechnique.Solid Property

DrawTechniqueSolid Property
Renders solid geometry without utilizing the alpha channel. This is the fastest default DrawTechnique.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<DrawTechnique> Solid { get; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

DrawTechnique Class
Duality.Resources Namespace


ExtMethodsShaderVarType Class

ExtMethodsShaderVarType Class
Inheritance Hierarchy
SystemObject
Duality.ResourcesExtMethodsShaderVarType

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsShaderVarType

The ExtMethodsShaderVarType type exposes the following members.

Methods
Name | Description
GetElementCount |
GetElementPrimitive |
Top
See Also

Reference

Duality.Resources Namespace


ExtMethodsShaderVarType Methods

ExtMethodsShaderVarType Methods

The ExtMethodsShaderVarType type exposes the following members.

Methods
Name | Description
GetElementCount |
GetElementPrimitive |
Top
See Also

Reference

ExtMethodsShaderVarType Class
Duality.Resources Namespace


ExtMethodsShaderVarType.GetElementCount Method

ExtMethodsShaderVarTypeGetElementCount Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static int GetElementCount(
    this ShaderFieldType type
)

Parameters

type
Type: Duality.ResourcesShaderFieldType

Return Value

Type: Int32

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ShaderFieldType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsShaderVarType Class
Duality.Resources Namespace


ExtMethodsShaderVarType.GetElementPrimitive Method

ExtMethodsShaderVarTypeGetElementPrimitive Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type GetElementPrimitive(
    this ShaderFieldType type
)

Parameters

type
Type: Duality.ResourcesShaderFieldType

Return Value

Type: Type

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ShaderFieldType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsShaderVarType Class
Duality.Resources Namespace


Font Class

Font Class
Represents a font. While any system font or imported TrueType font can be used, they are internally pre-rasterized and stored in a Texture with an Atlas.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesFont

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Font : Resource

The Font type exposes the following members.

Constructors
 | Name | Description
Public method | Font | Initializes a new instance of the Font class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Public method | EmitTextVertices(String, VertexC1P3T2) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, ColorRgba) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Protected method | Finalize | (Inherited from Resource.)
Public method | FitText | Returns a text that is cropped to fit a maximum width using this Font.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetGlyphBitmap | Retrieves the rasterized PixelData for a single glyph.
Public method | GetGlyphData | Retrieves information about a single glyph.
Public method | MeasureText(String) | Measures the size of a text rendered using this Font.
Public method | MeasureText(String) | Measures the size of a multiline text rendered using this Font.
Public method | MeasureTextGlyph | Measures position and size of a specific glyph inside a text.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | PickTextGlyph | Returns the index of the glyph that is located at a certain location within a text.
Public method | RenderToBitmap(String, PixelData, Single, Single) | Renders a text to the specified target Pixmap PixelData.
Public method | RenderToBitmap(String, PixelData, Single, Single, ColorRgba) | Renders a text to the specified target PixelData.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | SetGlyphData | Applies a new set of rendered glyphs to the Font, adjusts its typeface metadata and clears out the GlyphsDirty flag. This method is used by the editor to update a Font after adjusting its properties.
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | Ascent | [GET] The Fonts ascent value.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | BaseLine | [GET] The Fonts base line height.
Public property | BodyAscent | [GET] The Fonts body ascent value.
Public property | CharSpacing | [GET / SET] Additional spacing between each character. This is usually one tenth of the Fonts Size.
Public property | Descent | [GET] The Fonts descent value.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | EmbeddedTrueTypeFont | Obsolete. [GET] Returns a chunk of memory that contains this Fonts embedded TrueType data for rendering glyphs. This property is obsolete and will be removed in the next major version step.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
 | GenericMonospace10 | A generic monospace Font (Size 10) that has been loaded from your systems font library. This is usually "Courier New".
 | GenericMonospace8 | A generic monospace Font (Size 8) that has been loaded from your systems font library. This is usually "Courier New".
Public property | GlyphRenderMode | [GET / SET] Specifies how the glyphs of this Font are rendered in a text.
Public property | GlyphsDirty | Obsolete. [GET] Returns whether this Font requires to re-render its glyphs in order to match the changes that have been made to its Properties. This property is obsolete and will be removed in the next major version step.
Public property | Height | [GET] The Fonts height.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsPixelGridAligned | [GET] Returns whether this Font is (requesting to be) aligned to the pixel grid.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Kerning | [GET / SET] Whether this Font uses kerning, a technique where characters are moved closer together based on their actual shape, which usually looks much nicer. It has no visual effect when active at the same time with MonoSpace, however kerning sample data will be available on glyphs.
Public property | LineHeightFactor | [GET / SET] A factor for the Fonts Height value that affects line spacings but not actual glyph sizes.
Public property | LineSpacing | [GET] The y offset in pixels between two lines.
Public property | Material | [GET] The Material to use when rendering text of this Font.
Public property | Metrics | [GET] Provides access to various metrics that are inherent to this Font instance, such as size, height, and various typographic measures.
Public property | MonoSpace | Obsolete. [GET] Whether this is considered a monospace Font. If true, each character occupies exactly the same space.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Size | Obsolete. [GET] The size of the Font.
Public property | Style | Obsolete. [GET] The style of the font. This property is obsolete and will be removed in the next major version step.
Top
See Also

Reference

Duality.Resources Namespace


Font Constructor

Font Constructor
Initializes a new instance of the Font class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Font()
See Also

Reference

Font Class
Duality.Resources Namespace


Font Fields

Font Fields

The Font type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font Methods

Font Methods

The Font type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Public method | EmitTextVertices(String, VertexC1P3T2) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, ColorRgba) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Protected method | Finalize | (Inherited from Resource.)
Public method | FitText | Returns a text that is cropped to fit a maximum width using this Font.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetGlyphBitmap | Retrieves the rasterized PixelData for a single glyph.
Public method | GetGlyphData | Retrieves information about a single glyph.
Public method | MeasureText(String) | Measures the size of a text rendered using this Font.
Public method | MeasureText(String) | Measures the size of a multiline text rendered using this Font.
Public method | MeasureTextGlyph | Measures position and size of a specific glyph inside a text.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | PickTextGlyph | Returns the index of the glyph that is located at a certain location within a text.
Public method | RenderToBitmap(String, PixelData, Single, Single) | Renders a text to the specified target Pixmap PixelData.
Public method | RenderToBitmap(String, PixelData, Single, Single, ColorRgba) | Renders a text to the specified target PixelData.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | SetGlyphData | Applies a new set of rendered glyphs to the Font, adjusts its typeface metadata and clears out the GlyphsDirty flag. This method is used by the editor to update a Font after adjusting its properties.
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font.EmitTextVertices Method

FontEmitTextVertices Method
Overload List
 | Name | Description
Public method | EmitTextVertices(String, VertexC1P3T2) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, ColorRgba) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Public method | EmitTextVertices(String, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single) | Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font.EmitTextVertices Method (String, VertexC1P3T2[])

FontEmitTextVertices Method (String, VertexC1P3T2)
Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int EmitTextVertices(
    string text,
    ref VertexC1P3T2[] vertices
)

Parameters

text
Type: SystemString
The text to render.
vertices
Type: Duality.DrawingVertexC1P3T2
The set of vertices that is emitted. You can re-use the same array each frame.

Return Value

Type: Int32
The number of emitted vertices. This values isn't necessarily equal to the emitted arrays length.
See Also

Reference

Font Class
EmitTextVertices Overload
Duality.Resources Namespace


Font.EmitTextVertices Method (String, VertexC1P3T2[], Single, Single, ColorRgba)

FontEmitTextVertices Method (String, VertexC1P3T2, Single, Single, ColorRgba)
Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int EmitTextVertices(
    string text,
    ref VertexC1P3T2[] vertices,
    float x,
    float y,
    ColorRgba clr
)

Parameters

text
Type: SystemString
The text to render.
vertices
Type: Duality.DrawingVertexC1P3T2
The set of vertices that is emitted. You can re-use the same array each frame.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
clr
Type: Duality.DrawingColorRgba
The color value that is applied to each emitted vertex.

Return Value

Type: Int32
The number of emitted vertices. This values isn't necessarily equal to the emitted arrays length.
See Also

Reference

Font Class
EmitTextVertices Overload
Duality.Resources Namespace


Font.EmitTextVertices Method (String, VertexC1P3T2[], Single, Single, Single)

FontEmitTextVertices Method (String, VertexC1P3T2, Single, Single, Single)
Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int EmitTextVertices(
    string text,
    ref VertexC1P3T2[] vertices,
    float x,
    float y,
    float z = 0f
)

Parameters

text
Type: SystemString
The text to render.
vertices
Type: Duality.DrawingVertexC1P3T2
The set of vertices that is emitted. You can re-use the same array each frame.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
z (Optional)
Type: SystemSingle
An Z-Offset applied to the position of each emitted vertex.

Return Value

Type: Int32
The number of emitted vertices. This values isn't necessarily equal to the emitted arrays length.
See Also

Reference

Font Class
EmitTextVertices Overload
Duality.Resources Namespace


Font.EmitTextVertices Method (String, VertexC1P3T2[], Single, Single, Single, ColorRgba, Single, Single)

FontEmitTextVertices Method (String, VertexC1P3T2, Single, Single, Single, ColorRgba, Single, Single)
Emits a set of vertices based on a text. To render this text, simply use that set of vertices combined with the Fonts Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int EmitTextVertices(
    string text,
    ref VertexC1P3T2[] vertices,
    float x,
    float y,
    float z,
    ColorRgba clr,
    float angle = 0f,
    float scale = 1f
)

Parameters

text
Type: SystemString
The text to render.
vertices
Type: Duality.DrawingVertexC1P3T2
The set of vertices that is emitted. You can re-use the same array each frame.
x
Type: SystemSingle
An X-Offset applied to the position of each emitted vertex.
y
Type: SystemSingle
An Y-Offset applied to the position of each emitted vertex.
z
Type: SystemSingle
An Z-Offset applied to the position of each emitted vertex.
clr
Type: Duality.DrawingColorRgba
The color value that is applied to each emitted vertex.
angle (Optional)
Type: SystemSingle
An angle by which the text is rotated (before applying the offset).
scale (Optional)
Type: SystemSingle
A factor by which the text is scaled (before applying the offset).

Return Value

Type: Int32
The number of emitted vertices. This values isn't necessarily equal to the emitted arrays length.
See Also

Reference

Font Class
EmitTextVertices Overload
Duality.Resources Namespace


Font.FitText Method

FontFitText Method
Returns a text that is cropped to fit a maximum width using this Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FitText(
    string text,
    float maxWidth,
    FitTextMode fitMode = FitTextMode.ByChar
)

Parameters

text
Type: SystemString
The original text.
maxWidth
Type: SystemSingle
The maximum width it may occupy.
fitMode (Optional)
Type: Duality.DrawingFitTextMode
The mode by which the text fitting algorithm operates.

Return Value

Type: String
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GetGlyphBitmap Method

FontGetGlyphBitmap Method
Retrieves the rasterized PixelData for a single glyph.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData GetGlyphBitmap(
    char glyph
)

Parameters

glyph
Type: SystemChar
The glyph of which to retrieve the Bitmap.

Return Value

Type: PixelData
The Bitmap that has been retrieved, or null if the glyph is not supported.
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GetGlyphData Method

FontGetGlyphData Method
Retrieves information about a single glyph.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool GetGlyphData(
    char glyph,
    out FontGlyphData data
)

Parameters

glyph
Type: SystemChar
The glyph to retrieve information about.
data
Type: Duality.ResourcesFontGlyphData
A struct holding the retrieved information.

Return Value

Type: Boolean
True, if successful, false if the specified glyph is not supported.
See Also

Reference

Font Class
Duality.Resources Namespace


Font.MeasureText Method

FontMeasureText Method
Overload List
 | Name | Description
Public method | MeasureText(String) | Measures the size of a text rendered using this Font.
Public method | MeasureText(String) | Measures the size of a multiline text rendered using this Font.
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font.MeasureText Method (String)

FontMeasureText Method (String)
Measures the size of a text rendered using this Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MeasureText(
    string text
)

Parameters

text
Type: SystemString
The text to measure.

Return Value

Type: Vector2
The size of the measured text.
See Also

Reference

Font Class
MeasureText Overload
Duality.Resources Namespace


Font.MeasureText Method (String[])

FontMeasureText Method (String)
Measures the size of a multiline text rendered using this Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 MeasureText(
    string[] text
)

Parameters

text
Type: SystemString
The text to measure.

Return Value

Type: Vector2
The size of the measured text.
See Also

Reference

Font Class
MeasureText Overload
Duality.Resources Namespace


Font.MeasureTextGlyph Method

FontMeasureTextGlyph Method
Measures position and size of a specific glyph inside a text.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect MeasureTextGlyph(
    string text,
    int index
)

Parameters

text
Type: SystemString
The text that contains the glyph to measure.
index
Type: SystemInt32
The index of the glyph to measure.

Return Value

Type: Rect
A rectangle that describes the specified glyphs position and size.
See Also

Reference

Font Class
Duality.Resources Namespace


Font.OnCopyDataTo Method

FontOnCopyDataTo Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Font Class
Duality.Resources Namespace


Font.OnDisposing Method

FontOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Font Class
Duality.Resources Namespace


Font.OnLoaded Method

FontOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Font Class
Duality.Resources Namespace


Font.PickTextGlyph Method

FontPickTextGlyph Method
Returns the index of the glyph that is located at a certain location within a text.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int PickTextGlyph(
    string text,
    float x,
    float y
)

Parameters

text
Type: SystemString
The text from which to pick a glyph.
x
Type: SystemSingle
X-Coordinate of the position where to look for a glyph.
y
Type: SystemSingle
Y-Coordinate of the position where to look for a glyph.

Return Value

Type: Int32
The index of the glyph that is located at the specified position.
See Also

Reference

Font Class
Duality.Resources Namespace


Font.RenderToBitmap Method

FontRenderToBitmap Method
Overload List
 | Name | Description
Public method | RenderToBitmap(String, PixelData, Single, Single) | Renders a text to the specified target Pixmap PixelData.
Public method | RenderToBitmap(String, PixelData, Single, Single, ColorRgba) | Renders a text to the specified target PixelData.
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font.RenderToBitmap Method (String, PixelData, Single, Single)

FontRenderToBitmap Method (String, PixelData, Single, Single)
Renders a text to the specified target Pixmap PixelData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RenderToBitmap(
    string text,
    PixelData target,
    float x = 0f,
    float y = 0f
)

Parameters

text
Type: SystemString
target
Type: Duality.DrawingPixelData
x (Optional)
Type: SystemSingle
y (Optional)
Type: SystemSingle
See Also

Reference

Font Class
RenderToBitmap Overload
Duality.Resources Namespace


Font.RenderToBitmap Method (String, PixelData, Single, Single, ColorRgba)

FontRenderToBitmap Method (String, PixelData, Single, Single, ColorRgba)
Renders a text to the specified target PixelData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RenderToBitmap(
    string text,
    PixelData target,
    float x,
    float y,
    ColorRgba clr
)

Parameters

text
Type: SystemString
target
Type: Duality.DrawingPixelData
x
Type: SystemSingle
y
Type: SystemSingle
clr
Type: Duality.DrawingColorRgba
See Also

Reference

Font Class
RenderToBitmap Overload
Duality.Resources Namespace


Font.SetGlyphData Method

FontSetGlyphData Method
Applies a new set of rendered glyphs to the Font, adjusts its typeface metadata and clears out the GlyphsDirty flag. This method is used by the editor to update a Font after adjusting its properties.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetGlyphData(
    PixelData bitmap,
    Rect[] atlas,
    FontGlyphData[] glyphs,
    FontMetrics metrics
)

Parameters

bitmap
Type: Duality.DrawingPixelData
atlas
Type: DualityRect
glyphs
Type: Duality.ResourcesFontGlyphData
metrics
Type: Duality.ResourcesFontMetrics
See Also

Reference

Font Class
Duality.Resources Namespace


Font Properties

Font Properties

The Font type exposes the following members.

Properties
 | Name | Description
Public property | Ascent | [GET] The Fonts ascent value.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | BaseLine | [GET] The Fonts base line height.
Public property | BodyAscent | [GET] The Fonts body ascent value.
Public property | CharSpacing | [GET / SET] Additional spacing between each character. This is usually one tenth of the Fonts Size.
Public property | Descent | [GET] The Fonts descent value.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | EmbeddedTrueTypeFont | Obsolete. [GET] Returns a chunk of memory that contains this Fonts embedded TrueType data for rendering glyphs. This property is obsolete and will be removed in the next major version step.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
 | GenericMonospace10 | A generic monospace Font (Size 10) that has been loaded from your systems font library. This is usually "Courier New".
 | GenericMonospace8 | A generic monospace Font (Size 8) that has been loaded from your systems font library. This is usually "Courier New".
Public property | GlyphRenderMode | [GET / SET] Specifies how the glyphs of this Font are rendered in a text.
Public property | GlyphsDirty | Obsolete. [GET] Returns whether this Font requires to re-render its glyphs in order to match the changes that have been made to its Properties. This property is obsolete and will be removed in the next major version step.
Public property | Height | [GET] The Fonts height.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsPixelGridAligned | [GET] Returns whether this Font is (requesting to be) aligned to the pixel grid.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Kerning | [GET / SET] Whether this Font uses kerning, a technique where characters are moved closer together based on their actual shape, which usually looks much nicer. It has no visual effect when active at the same time with MonoSpace, however kerning sample data will be available on glyphs.
Public property | LineHeightFactor | [GET / SET] A factor for the Fonts Height value that affects line spacings but not actual glyph sizes.
Public property | LineSpacing | [GET] The y offset in pixels between two lines.
Public property | Material | [GET] The Material to use when rendering text of this Font.
Public property | Metrics | [GET] Provides access to various metrics that are inherent to this Font instance, such as size, height, and various typographic measures.
Public property | MonoSpace | Obsolete. [GET] Whether this is considered a monospace Font. If true, each character occupies exactly the same space.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Size | Obsolete. [GET] The size of the Font.
Public property | Style | Obsolete. [GET] The style of the font. This property is obsolete and will be removed in the next major version step.
Top
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Ascent Property

FontAscent Property
[GET] The Fonts ascent value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Ascent { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.BaseLine Property

FontBaseLine Property
[GET] The Fonts base line height.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int BaseLine { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.BodyAscent Property

FontBodyAscent Property
[GET] The Fonts body ascent value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int BodyAscent { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.CharSpacing Property

FontCharSpacing Property
[GET / SET] Additional spacing between each character. This is usually one tenth of the Fonts Size.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float CharSpacing { get; set; }

Property Value

Type: Single
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Descent Property

FontDescent Property
[GET] The Fonts descent value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Descent { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.EmbeddedTrueTypeFont Property

FontEmbeddedTrueTypeFont Property

Note: This API is now obsolete.

[GET] Returns a chunk of memory that contains this Fonts embedded TrueType data for rendering glyphs. This property is obsolete and will be removed in the next major version step.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("This property is obsolete with the new Font importer and custom import parameters.")]
public byte[] EmbeddedTrueTypeFont { get; set; }

Property Value

Type: Byte
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GenericMonospace10 Property

FontGenericMonospace10 Property
A generic monospace Font (Size 10) that has been loaded from your systems font library. This is usually "Courier New".

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Font> GenericMonospace10 { get; }

Property Value

Type: ContentRef Font
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GenericMonospace8 Property

FontGenericMonospace8 Property
A generic monospace Font (Size 8) that has been loaded from your systems font library. This is usually "Courier New".

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Font> GenericMonospace8 { get; }

Property Value

Type: ContentRef Font
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GlyphRenderMode Property

FontGlyphRenderMode Property
[GET / SET] Specifies how the glyphs of this Font are rendered in a text.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontRenderMode GlyphRenderMode { get; set; }

Property Value

Type: FontRenderMode
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GlyphsDirty Property

FontGlyphsDirty Property

Note: This API is now obsolete.

[GET] Returns whether this Font requires to re-render its glyphs in order to match the changes that have been made to its Properties. This property is obsolete and will be removed in the next major version step.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("This property is obsolete with the new Font importer and custom import parameters.")]
public bool GlyphsDirty { get; }

Property Value

Type: Boolean
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Height Property

FontHeight Property
[GET] The Fonts height.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.IsPixelGridAligned Property

FontIsPixelGridAligned Property
[GET] Returns whether this Font is (requesting to be) aligned to the pixel grid.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPixelGridAligned { get; }

Property Value

Type: Boolean
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Kerning Property

FontKerning Property
[GET / SET] Whether this Font uses kerning, a technique where characters are moved closer together based on their actual shape, which usually looks much nicer. It has no visual effect when active at the same time with MonoSpace, however kerning sample data will be available on glyphs.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Kerning { get; set; }

Property Value

Type: Boolean
See Also

Reference

Font Class
Duality.Resources Namespace
Duality.ResourcesFontGlyphData


Font.LineHeightFactor Property

FontLineHeightFactor Property
[GET / SET] A factor for the Fonts Height value that affects line spacings but not actual glyph sizes.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LineHeightFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Font Class
Duality.Resources Namespace


Font.LineSpacing Property

FontLineSpacing Property
[GET] The y offset in pixels between two lines.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int LineSpacing { get; }

Property Value

Type: Int32
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Material Property

FontMaterial Property
[GET] The Material to use when rendering text of this Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Material Material { get; }

Property Value

Type: Material
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Metrics Property

FontMetrics Property
[GET] Provides access to various metrics that are inherent to this Font instance, such as size, height, and various typographic measures.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontMetrics Metrics { get; }

Property Value

Type: FontMetrics
See Also

Reference

Font Class
Duality.Resources Namespace


Font.MonoSpace Property

FontMonoSpace Property

Note: This API is now obsolete.

[GET] Whether this is considered a monospace Font. If true, each character occupies exactly the same space.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Monospace information is import-only. Modify importer settings instead. For read-only access, use the Metrics property.")]
public bool MonoSpace { get; set; }

Property Value

Type: Boolean
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Size Property

FontSize Property

Note: This API is now obsolete.

[GET] The size of the Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Size information is import-only. Modify importer settings instead. For read-only access, use the Metrics property.")]
public float Size { get; set; }

Property Value

Type: Single
See Also

Reference

Font Class
Duality.Resources Namespace


Font.Style Property

FontStyle Property

Note: This API is now obsolete.

[GET] The style of the font. This property is obsolete and will be removed in the next major version step.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
[ObsoleteAttribute("Style information is import-only. Modify importer settings instead.")]
public FontStyle Style { get; set; }

Property Value

Type: FontStyle
See Also

Reference

Font Class
Duality.Resources Namespace


Font.GlyphData Structure

FontGlyphData Structure
Contains data about a single glyph.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct GlyphData

The FontGlyphData type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Fields
 | Name | Description
Public field | Glyph | The glyph that is encoded.
Public field | Height | The height of the glyph.
Public field | KerningSamplesLeft | The glyphs kerning samples to the left.
Public field | KerningSamplesRight | The glyphs kerning samples to the right.
Public field | OffsetX | The glyphs X offset when rendering it.
Public field | OffsetY | The glyphs Y offset when rendering it.
Public field | Width | The width of the glyph.
Top
See Also

Reference

Duality.Resources Namespace


GlyphData Fields

GlyphData Fields

The FontGlyphData type exposes the following members.

Fields
 | Name | Description
Public field | Glyph | The glyph that is encoded.
Public field | Height | The height of the glyph.
Public field | KerningSamplesLeft | The glyphs kerning samples to the left.
Public field | KerningSamplesRight | The glyphs kerning samples to the right.
Public field | OffsetX | The glyphs X offset when rendering it.
Public field | OffsetY | The glyphs Y offset when rendering it.
Public field | Width | The width of the glyph.
Top
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.Glyph Field

FontGlyphDataGlyph Field
The glyph that is encoded.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public char Glyph

Field Value

Type: Char
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.Height Field

FontGlyphDataHeight Field
The height of the glyph.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.KerningSamplesLeft Field

FontGlyphDataKerningSamplesLeft Field
The glyphs kerning samples to the left.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] KerningSamplesLeft

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.KerningSamplesRight Field

FontGlyphDataKerningSamplesRight Field
The glyphs kerning samples to the right.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int[] KerningSamplesRight

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.OffsetX Field

FontGlyphDataOffsetX Field
The glyphs X offset when rendering it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int OffsetX

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.OffsetY Field

FontGlyphDataOffsetY Field
The glyphs Y offset when rendering it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int OffsetY

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.Width Field

FontGlyphDataWidth Field
The width of the glyph.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width

Field Value

Type: Int32
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


GlyphData Methods

GlyphData Methods

The FontGlyphData type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.GlyphData.ToString Method

FontGlyphDataToString Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

FontGlyphData Structure
Duality.Resources Namespace


Font.RenderMode Enumeration

FontRenderMode Enumeration
Specifies how a Font is rendered. This affects both internal glyph rasterization and rendering.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum RenderMode
Members
Member name | Value | Description
MonochromeBitmap | 0 | A monochrome bitmap is used to store glyphs. Rendering is unfiltered and pixel-perfect.
GrayscaleBitmap | 1 | A greyscale bitmap is used to store glyphs. Rendering is unfiltered and pixel-perfect.
SmoothBitmap | 2 | A greyscale bitmap is used to store glyphs. Rendering is properly filtered but may blur text display a little.
SharpBitmap | 3 | A greyscale bitmap is used to store glyphs. Rendering is properly filtered and uses a shader to enforce sharp masked edges.
See Also

Reference

Duality.Resources Namespace


FontCharSet Class

FontCharSet Class
Represents a character set that defines which glyphs are available in a Font Resource.
Inheritance Hierarchy
SystemObject
Duality.ResourcesFontCharSet

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class FontCharSet

The FontCharSet type exposes the following members.

Constructors
 | Name | Description
Public method | FontCharSet(String) | Initializes a new instance of the FontCharSet class
Public method | FontCharSet(String, String, String, String) | Initializes a new instance of the FontCharSet class
Top
Methods
 | Name | Description
Public method | MergedWith | Merges two character sets to form a new one that contains both of their characters without duplicates.
Top
Fields
Name | Description
Default |
Top
Properties
 | Name | Description
Public property | CharBaseLineRef | [GET] Characters which will contribute to calculating the BaseLine parameter.
Public property | CharBodyAscentRef | [GET] Characters which will contribute to calculating the Ascent parameter.
Public property | CharDescentRef | [GET] Characters which will contribute to calculating the Descent parameter.
Public property | Chars | [GET] All characters that are part of this FontCharSet.
Top
See Also

Reference

Duality.Resources Namespace


FontCharSet Constructor

FontCharSet Constructor
Overload List
 | Name | Description
Public method | FontCharSet(String) | Initializes a new instance of the FontCharSet class
Public method | FontCharSet(String, String, String, String) | Initializes a new instance of the FontCharSet class
Top
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet Constructor (String)

FontCharSet Constructor (String)
Initializes a new instance of the FontCharSet class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontCharSet(
    string chars
)

Parameters

chars
Type: SystemString
See Also

Reference

FontCharSet Class
FontCharSet Overload
Duality.Resources Namespace


FontCharSet Constructor (String, String, String, String)

FontCharSet Constructor (String, String, String, String)
Initializes a new instance of the FontCharSet class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontCharSet(
    string chars,
    string charBaseLineRef,
    string charDescentRef,
    string charBodyAscentRef
)

Parameters

chars
Type: SystemString
charBaseLineRef
Type: SystemString
charDescentRef
Type: SystemString
charBodyAscentRef
Type: SystemString
See Also

Reference

FontCharSet Class
FontCharSet Overload
Duality.Resources Namespace


FontCharSet Fields

FontCharSet Fields

The FontCharSet type exposes the following members.

Fields
Name | Description
Default |
Top
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.Default Field

FontCharSetDefault Field

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static readonly FontCharSet Default

Field Value

Type: FontCharSet
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet Methods

FontCharSet Methods

The FontCharSet type exposes the following members.

Methods
 | Name | Description
Public method | MergedWith | Merges two character sets to form a new one that contains both of their characters without duplicates.
Top
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.MergedWith Method

FontCharSetMergedWith Method
Merges two character sets to form a new one that contains both of their characters without duplicates.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontCharSet MergedWith(
    FontCharSet second
)

Parameters

second
Type: Duality.ResourcesFontCharSet

Return Value

Type: FontCharSet
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet Properties

FontCharSet Properties

The FontCharSet type exposes the following members.

Properties
 | Name | Description
Public property | CharBaseLineRef | [GET] Characters which will contribute to calculating the BaseLine parameter.
Public property | CharBodyAscentRef | [GET] Characters which will contribute to calculating the Ascent parameter.
Public property | CharDescentRef | [GET] Characters which will contribute to calculating the Descent parameter.
Public property | Chars | [GET] All characters that are part of this FontCharSet.
Top
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.CharBaseLineRef Property

FontCharSetCharBaseLineRef Property
[GET] Characters which will contribute to calculating the BaseLine parameter.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string CharBaseLineRef { get; }

Property Value

Type: String
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.CharBodyAscentRef Property

FontCharSetCharBodyAscentRef Property
[GET] Characters which will contribute to calculating the Ascent parameter.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string CharBodyAscentRef { get; }

Property Value

Type: String
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.CharDescentRef Property

FontCharSetCharDescentRef Property
[GET] Characters which will contribute to calculating the Descent parameter.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string CharDescentRef { get; }

Property Value

Type: String
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontCharSet.Chars Property

FontCharSetChars Property
[GET] All characters that are part of this FontCharSet.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Chars { get; }

Property Value

Type: String
See Also

Reference

FontCharSet Class
Duality.Resources Namespace


FontMetrics Class

FontMetrics Class
Provides information about the shape and size of a Font. This information is not specific to a certain text or glyph.
Inheritance Hierarchy
SystemObject
Duality.ResourcesFontMetrics

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class FontMetrics

The FontMetrics type exposes the following members.

Constructors
 | Name | Description
Public method | FontMetrics | Initializes a new instance of the FontMetrics class
Top
Properties
 | Name | Description
Public property | Ascent | [GET] The ascender height of the Font, in pixels.
Public property | BaseLine | [GET] The baseline height of the Font, in pixels.
Public property | BodyAscent | [GET] The median / mean line / x glyph height of the Font, in pixels.
Public property | Descent | [GET] The descender height of the Font, in pixels.
Public property | Height | [GET] The height of the Font, in pixels.
Public property | Monospace | [GET] Whether the described Font is considered to be a monospace Font, i.e. whether all characters occupy the same horizontal space.
Public property | Size | [GET] The size of the Font.
Top
See Also

Reference

Duality.Resources Namespace


FontMetrics Constructor

FontMetrics Constructor
Initializes a new instance of the FontMetrics class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FontMetrics(
    float size,
    int height,
    int ascent,
    int bodyAscent,
    int descent,
    int baseLine,
    bool monospace
)

Parameters

size
Type: SystemSingle
height
Type: SystemInt32
ascent
Type: SystemInt32
bodyAscent
Type: SystemInt32
descent
Type: SystemInt32
baseLine
Type: SystemInt32
monospace
Type: SystemBoolean
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics Properties

FontMetrics Properties

The FontMetrics type exposes the following members.

Properties
 | Name | Description
Public property | Ascent | [GET] The ascender height of the Font, in pixels.
Public property | BaseLine | [GET] The baseline height of the Font, in pixels.
Public property | BodyAscent | [GET] The median / mean line / x glyph height of the Font, in pixels.
Public property | Descent | [GET] The descender height of the Font, in pixels.
Public property | Height | [GET] The height of the Font, in pixels.
Public property | Monospace | [GET] Whether the described Font is considered to be a monospace Font, i.e. whether all characters occupy the same horizontal space.
Public property | Size | [GET] The size of the Font.
Top
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.Ascent Property

FontMetricsAscent Property
[GET] The ascender height of the Font, in pixels.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Ascent { get; }

Property Value

Type: Int32
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.BaseLine Property

FontMetricsBaseLine Property
[GET] The baseline height of the Font, in pixels.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int BaseLine { get; }

Property Value

Type: Int32
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.BodyAscent Property

FontMetricsBodyAscent Property
[GET] The median / mean line / x glyph height of the Font, in pixels.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int BodyAscent { get; }

Property Value

Type: Int32
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.Descent Property

FontMetricsDescent Property
[GET] The descender height of the Font, in pixels.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Descent { get; }

Property Value

Type: Int32
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.Height Property

FontMetricsHeight Property
[GET] The height of the Font, in pixels.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.Monospace Property

FontMetricsMonospace Property
[GET] Whether the described Font is considered to be a monospace Font, i.e. whether all characters occupy the same horizontal space.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Monospace { get; }

Property Value

Type: Boolean
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FontMetrics.Size Property

FontMetricsSize Property
[GET] The size of the Font.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float Size { get; }

Property Value

Type: Single
See Also

Reference

FontMetrics Class
Duality.Resources Namespace


FragmentShader Class

FragmentShader Class
Represents an OpenGL FragmentShader.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesAbstractShader
Duality.ResourcesFragmentShader

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class FragmentShader : AbstractShader

The FragmentShader type exposes the following members.

Constructors
 | Name | Description
Public method | FragmentShader | Initializes a new instance of the FragmentShader class
Public method | FragmentShader(String) | Initializes a new instance of the FragmentShader class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram. (Inherited from AbstractShader.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Inherited from AbstractShader.)
Protected method | OnDisposing | (Inherited from AbstractShader.)
Protected method | OnLoaded | (Inherited from AbstractShader.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not. (Inherited from AbstractShader.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | [GET] A minimal FragmentShader. It performs a texture lookup and applies vertex-coloring.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing. (Inherited from AbstractShader.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | [GET] A FragmentShader designed for picking operations. It uses the provided texture for alpha output and forwards the incoming RGB color value.
 | SharpAlpha | [GET] The SharpMask FragmentShader. It enforces an antialiazed sharp mask when upscaling linearly blended textures.
 | SmoothAnim | [GET] The SmoothAnim FragmentShader. It performs two lookups on the same texture and blends the results using an incoming float value.
Public property | Source | [GET] The shaders source code. (Inherited from AbstractShader.)
Protected property | Type | (Overrides AbstractShaderType.)
Top
See Also

Reference

Duality.Resources Namespace


FragmentShader Constructor

FragmentShader Constructor
Overload List
 | Name | Description
Public method | FragmentShader | Initializes a new instance of the FragmentShader class
Public method | FragmentShader(String) | Initializes a new instance of the FragmentShader class
Top
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader Constructor

FragmentShader Constructor
Initializes a new instance of the FragmentShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FragmentShader()
See Also

Reference

FragmentShader Class
FragmentShader Overload
Duality.Resources Namespace


FragmentShader Constructor (String)

FragmentShader Constructor (String)
Initializes a new instance of the FragmentShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FragmentShader(
    string sourceCode
)

Parameters

sourceCode
Type: SystemString
See Also

Reference

FragmentShader Class
FragmentShader Overload
Duality.Resources Namespace


FragmentShader Fields

FragmentShader Fields

The FragmentShader type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader Methods

FragmentShader Methods

The FragmentShader type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram. (Inherited from AbstractShader.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Inherited from AbstractShader.)
Protected method | OnDisposing | (Inherited from AbstractShader.)
Protected method | OnLoaded | (Inherited from AbstractShader.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader Properties

FragmentShader Properties

The FragmentShader type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not. (Inherited from AbstractShader.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | [GET] A minimal FragmentShader. It performs a texture lookup and applies vertex-coloring.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing. (Inherited from AbstractShader.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | [GET] A FragmentShader designed for picking operations. It uses the provided texture for alpha output and forwards the incoming RGB color value.
 | SharpAlpha | [GET] The SharpMask FragmentShader. It enforces an antialiazed sharp mask when upscaling linearly blended textures.
 | SmoothAnim | [GET] The SmoothAnim FragmentShader. It performs two lookups on the same texture and blends the results using an incoming float value.
Public property | Source | [GET] The shaders source code. (Inherited from AbstractShader.)
Protected property | Type | (Overrides AbstractShaderType.)
Top
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader.Minimal Property

FragmentShaderMinimal Property
[GET] A minimal FragmentShader. It performs a texture lookup and applies vertex-coloring.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<FragmentShader> Minimal { get; }

Property Value

Type: ContentRef FragmentShader
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader.Picking Property

FragmentShaderPicking Property
[GET] A FragmentShader designed for picking operations. It uses the provided texture for alpha output and forwards the incoming RGB color value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<FragmentShader> Picking { get; }

Property Value

Type: ContentRef FragmentShader
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader.SharpAlpha Property

FragmentShaderSharpAlpha Property
[GET] The SharpMask FragmentShader. It enforces an antialiazed sharp mask when upscaling linearly blended textures.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<FragmentShader> SharpAlpha { get; }

Property Value

Type: ContentRef FragmentShader
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader.SmoothAnim Property

FragmentShaderSmoothAnim Property
[GET] The SmoothAnim FragmentShader. It performs two lookups on the same texture and blends the results using an incoming float value.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<FragmentShader> SmoothAnim { get; }

Property Value

Type: ContentRef FragmentShader
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


FragmentShader.Type Property

FragmentShaderType Property

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override ShaderType Type { get; }

Property Value

Type: ShaderType
See Also

Reference

FragmentShader Class
Duality.Resources Namespace


Material Class

Material Class
Materials are standardized BatchInfos, stored as a Resource. Just like BatchInfo objects, they describe how an object, represented by a set of vertices, looks like. Using Materials is generally more performant than using BatchInfos but not always reasonable, for example when there is a single, unique GameObject with a special appearance: This is a typical BatchInfo case.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesMaterial

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Material : Resource

The Material type exposes the following members.

Constructors
 | Name | Description
Public method | Material | Creates a new Material
Public method | Material(BatchInfo) | Creates a new Material based on the specified BatchInfo
Public method | Material(ContentRefDrawTechnique, ColorRgba, ContentRefTexture) | Creates a new single-texture Material.
Public method | Material(ContentRefDrawTechnique, ColorRgba, DictionaryString, ContentRefTexture, DictionaryString, Single) | Creates a new complex Material.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetTexture | Gets a texture by name. Returns a null reference if the name doesn't exist.
Public method | GetUniform | Gets a uniform by name. Returns a null reference if the name doesn't exist.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | SetTexture | Sets a texture within the Material.
Public method | SetUniform(String, Single) | Sets a uniform value within the Material.
Public method | SetUniform(String, Int32, Single) | Sets a uniform value within the Material.
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Checkerboard | A Material showing a black and white checkerboard.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | A Material showing the Duality icon.
 | DualityIconB | A Material showing the Duality icon, but without the text on it.
 | DualityLogoBig | A Material showing the Duality logo.
 | DualityLogoMedium | A Material showing the Duality logo.
 | DualityLogoSmall | A Material showing the Duality logo.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Info | [GET] Returns a new BatchInfo object that mirrors the Materials current settings.
 | InvertWhite | A Material that inverts its background.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | MainColor | [GET / SET] The main color, typically used for coloring displayed vertices.
Public property | MainTexture | [GET / SET] The Materials main texture.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | SolidBlack | A solid, black Material.
 | SolidWhite | A solid, white Material.
Public property | Technique | [GET / SET] The DrawTechnique that is used.
Public property | Textures | [GET / SET] The set of Textures to use.
Public property | Uniforms | [GET / SET] The set of uniform values to use.
Top
See Also

Reference

Duality.Resources Namespace
Duality.DrawingBatchInfo


Material Constructor

Material Constructor
Overload List
 | Name | Description
Public method | Material | Creates a new Material
Public method | Material(BatchInfo) | Creates a new Material based on the specified BatchInfo
Public method | Material(ContentRefDrawTechnique, ColorRgba, ContentRefTexture) | Creates a new single-texture Material.
Public method | Material(ContentRefDrawTechnique, ColorRgba, DictionaryString, ContentRefTexture, DictionaryString, Single) | Creates a new complex Material.
Top
See Also

Reference

Material Class
Duality.Resources Namespace


Material Constructor

Material Constructor
Creates a new Material

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Material()
See Also

Reference

Material Class
Material Overload
Duality.Resources Namespace


Material Constructor (BatchInfo)

Material Constructor (BatchInfo)
Creates a new Material based on the specified BatchInfo

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Material(
    BatchInfo info
)

Parameters

info
Type: Duality.DrawingBatchInfo
See Also

Reference

Material Class
Material Overload
Duality.Resources Namespace


Material Constructor (ContentRef(DrawTechnique), ColorRgba, ContentRef(Texture))

Material Constructor (ContentRefDrawTechnique, ColorRgba, ContentRefTexture)
Creates a new single-texture Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Material(
    ContentRef<DrawTechnique> technique,
    ColorRgba mainColor,
    ContentRef<Texture> mainTex
)

Parameters

technique
Type: DualityContentRef DrawTechnique
The DrawTechnique to use.
mainColor
Type: Duality.DrawingColorRgba
The MainColor to use.
mainTex
Type: DualityContentRef Texture
The main Texture to use.
See Also

Reference

Material Class
Material Overload
Duality.Resources Namespace


Material Constructor (ContentRef(DrawTechnique), ColorRgba, Dictionary(String, ContentRef(Texture)), Dictionary(String, Single[]))

Material Constructor (ContentRefDrawTechnique, ColorRgba, DictionaryString, ContentRefTexture, DictionaryString, Single)
Creates a new complex Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Material(
    ContentRef<DrawTechnique> technique,
    ColorRgba mainColor,
    Dictionary<string, ContentRef<Texture>> textures = null,
    Dictionary<string, float[]> uniforms = null
)

Parameters

technique
Type: DualityContentRef DrawTechnique
The DrawTechnique to use.
mainColor
Type: Duality.DrawingColorRgba
The MainColor to use.
textures (Optional)
Type: System.Collections.GenericDictionary String, ContentRef Texture
A set of Textures to use.
uniforms (Optional)
Type: System.Collections.GenericDictionary String, Single
A set of uniform values to use.
See Also

Reference

Material Class
Material Overload
Duality.Resources Namespace


Material Fields

Material Fields

The Material type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Material Class
Duality.Resources Namespace


Material Methods

Material Methods

The Material type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetTexture | Gets a texture by name. Returns a null reference if the name doesn't exist.
Public method | GetUniform | Gets a uniform by name. Returns a null reference if the name doesn't exist.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | SetTexture | Sets a texture within the Material.
Public method | SetUniform(String, Single) | Sets a uniform value within the Material.
Public method | SetUniform(String, Int32, Single) | Sets a uniform value within the Material.
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Material Class
Duality.Resources Namespace


Material.GetTexture Method

MaterialGetTexture Method
Gets a texture by name. Returns a null reference if the name doesn't exist.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Texture> GetTexture(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: ContentRef Texture
See Also

Reference

Material Class
Duality.Resources Namespace


Material.GetUniform Method

MaterialGetUniform Method
Gets a uniform by name. Returns a null reference if the name doesn't exist.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float[] GetUniform(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: Single
See Also

Reference

Material Class
Duality.Resources Namespace


Material.OnLoaded Method

MaterialOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Material Class
Duality.Resources Namespace


Material.SetTexture Method

MaterialSetTexture Method
Sets a texture within the Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetTexture(
    string name,
    ContentRef<Texture> tex
)

Parameters

name
Type: SystemString
tex
Type: DualityContentRef Texture
See Also

Reference

Material Class
Duality.Resources Namespace


Material.SetUniform Method

MaterialSetUniform Method
Overload List
 | Name | Description
Public method | SetUniform(String, Single) | Sets a uniform value within the Material.
Public method | SetUniform(String, Int32, Single) | Sets a uniform value within the Material.
Top
See Also

Reference

Material Class
Duality.Resources Namespace


Material.SetUniform Method (String, Single[])

MaterialSetUniform Method (String, Single)
Sets a uniform value within the Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetUniform(
    string name,
    params float[] uniform
)

Parameters

name
Type: SystemString
uniform
Type: SystemSingle
See Also

Reference

Material Class
SetUniform Overload
Duality.Resources Namespace


Material.SetUniform Method (String, Int32, Single)

MaterialSetUniform Method (String, Int32, Single)
Sets a uniform value within the Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetUniform(
    string name,
    int index,
    float uniformVal
)

Parameters

name
Type: SystemString
index
Type: SystemInt32
uniformVal
Type: SystemSingle
See Also

Reference

Material Class
SetUniform Overload
Duality.Resources Namespace


Material Properties

Material Properties

The Material type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Checkerboard | A Material showing a black and white checkerboard.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | A Material showing the Duality icon.
 | DualityIconB | A Material showing the Duality icon, but without the text on it.
 | DualityLogoBig | A Material showing the Duality logo.
 | DualityLogoMedium | A Material showing the Duality logo.
 | DualityLogoSmall | A Material showing the Duality logo.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Info | [GET] Returns a new BatchInfo object that mirrors the Materials current settings.
 | InvertWhite | A Material that inverts its background.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | MainColor | [GET / SET] The main color, typically used for coloring displayed vertices.
Public property | MainTexture | [GET / SET] The Materials main texture.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | SolidBlack | A solid, black Material.
 | SolidWhite | A solid, white Material.
Public property | Technique | [GET / SET] The DrawTechnique that is used.
Public property | Textures | [GET / SET] The set of Textures to use.
Public property | Uniforms | [GET / SET] The set of uniform values to use.
Top
See Also

Reference

Material Class
Duality.Resources Namespace


Material.Checkerboard Property

MaterialCheckerboard Property
A Material showing a black and white checkerboard.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> Checkerboard { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.DualityIcon Property

MaterialDualityIcon Property
A Material showing the Duality icon.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> DualityIcon { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.DualityIconB Property

MaterialDualityIconB Property
A Material showing the Duality icon, but without the text on it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> DualityIconB { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.DualityLogoBig Property

MaterialDualityLogoBig Property
A Material showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> DualityLogoBig { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.DualityLogoMedium Property

MaterialDualityLogoMedium Property
A Material showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> DualityLogoMedium { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.DualityLogoSmall Property

MaterialDualityLogoSmall Property
A Material showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> DualityLogoSmall { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.Info Property

MaterialInfo Property
[GET] Returns a new BatchInfo object that mirrors the Materials current settings.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BatchInfo Info { get; }

Property Value

Type: BatchInfo
See Also

Reference

Material Class
Duality.Resources Namespace


Material.InvertWhite Property

MaterialInvertWhite Property
A Material that inverts its background.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> InvertWhite { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.MainColor Property

MaterialMainColor Property
[GET / SET] The main color, typically used for coloring displayed vertices.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ColorRgba MainColor { get; set; }

Property Value

Type: ColorRgba
See Also

Reference

Material Class
Duality.Resources Namespace


Material.MainTexture Property

MaterialMainTexture Property
[GET / SET] The Materials main texture.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Texture> MainTexture { get; set; }

Property Value

Type: ContentRef Texture
See Also

Reference

Material Class
Duality.Resources Namespace


Material.SolidBlack Property

MaterialSolidBlack Property
A solid, black Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> SolidBlack { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.SolidWhite Property

MaterialSolidWhite Property
A solid, white Material.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Material> SolidWhite { get; }

Property Value

Type: ContentRef Material
See Also

Reference

Material Class
Duality.Resources Namespace


Material.Technique Property

MaterialTechnique Property
[GET / SET] The DrawTechnique that is used.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<DrawTechnique> Technique { get; set; }

Property Value

Type: ContentRef DrawTechnique
See Also

Reference

Material Class
Duality.Resources Namespace


Material.Textures Property

MaterialTextures Property
[GET / SET] The set of Textures to use.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<KeyValuePair<string, ContentRef<Texture>>> Textures { get; set; }

Property Value

Type: IEnumerable KeyValuePair String, ContentRef Texture
See Also

Reference

Material Class
Duality.Resources Namespace


Material.Uniforms Property

MaterialUniforms Property
[GET / SET] The set of uniform values to use.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<KeyValuePair<string, float[]>> Uniforms { get; set; }

Property Value

Type: IEnumerable KeyValuePair String, Single
See Also

Reference

Material Class
Duality.Resources Namespace


Pixmap Class

Pixmap Class
A Pixmap stores pixel data in system memory.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesPixmap

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Pixmap : Resource

The Pixmap type exposes the following members.

Constructors
 | Name | Description
Public method | Pixmap | Creates a new, empty Pixmap.
Public method | Pixmap(PixelData) | Creates a new Pixmap from the specified PixelData.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GenerateAnimAtlas | Generates a pixmap atlas for sprite animations but leaves previously existing atlas entries as they are, if possible. An automatically generated pixmap atlas will always occupy the first indices, followed by custom atlas entries.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | Called when this Resource has just been loaded. (Inherited from Resource.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AnimCols | [GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.
Public property | AnimFrameBorder | [GET / SET] Pixel size of the border around each individual animation frame. within the image.
Public property | AnimFrames | [GET] Total number of animation frames in this Pixmap
Public property | AnimRows | [GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Atlas | [GET / SET] The Pixmaps atlas array, distinguishing different areas in pixel coordinates
 | Checkerboard | [GET] A 256x256 black and white checkerboard image.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | [GET] A Pixmap showing the Duality icon.
 | DualityIconB | [GET] A Pixmap showing the Duality icon without the text on it.
 | DualityLogoBig | A Pixmap showing the Duality logo.
 | DualityLogoMedium | A Pixmap showing the Duality logo.
 | DualityLogoSmall | A Pixmap showing the Duality logo.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Height | [GET] The Height of the actual pixel data.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | MainLayer | [GET / SET] The main PixelData layer of this Pixmap.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PixelData | [GET / SET] A list of PixelData layers.
 | White | [GET] A plain white 1x1 Pixmap. Can be used as a dummy.
Public property | Width | [GET] The Width of the actual pixel data.
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesTexture


Pixmap Constructor

Pixmap Constructor
Overload List
 | Name | Description
Public method | Pixmap | Creates a new, empty Pixmap.
Public method | Pixmap(PixelData) | Creates a new Pixmap from the specified PixelData.
Top
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap Constructor

Pixmap Constructor
Creates a new, empty Pixmap.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Pixmap()
See Also

Reference

Pixmap Class
Pixmap Overload
Duality.Resources Namespace


Pixmap Constructor (PixelData)

Pixmap Constructor (PixelData)
Creates a new Pixmap from the specified PixelData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Pixmap(
    PixelData image
)

Parameters

image
Type: Duality.DrawingPixelData
See Also

Reference

Pixmap Class
Pixmap Overload
Duality.Resources Namespace


Pixmap Fields

Pixmap Fields

The Pixmap type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap Methods

Pixmap Methods

The Pixmap type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GenerateAnimAtlas | Generates a pixmap atlas for sprite animations but leaves previously existing atlas entries as they are, if possible. An automatically generated pixmap atlas will always occupy the first indices, followed by custom atlas entries.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | Called when this Resource has just been loaded. (Inherited from Resource.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.GenerateAnimAtlas Method

PixmapGenerateAnimAtlas Method
Generates a pixmap atlas for sprite animations but leaves previously existing atlas entries as they are, if possible. An automatically generated pixmap atlas will always occupy the first indices, followed by custom atlas entries.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void GenerateAnimAtlas(
    int cols,
    int rows,
    int frameBorder
)

Parameters

cols
Type: SystemInt32
The number of columns in an animated sprite Pixmap
rows
Type: SystemInt32
The number of rows in an animated sprite Pixmap
frameBorder
Type: SystemInt32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.LookupAtlas Method

PixmapLookupAtlas Method
Overload List
 | Name | Description
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) pixmap Atlas lookup.
Top
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.LookupAtlas Method (Int32)

PixmapLookupAtlas Method (Int32)
Does a safe (null-checked, clamped) pixmap Atlas lookup.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect LookupAtlas(
    int index
)

Parameters

index
Type: SystemInt32

Return Value

Type: Rect
See Also

Reference

Pixmap Class
LookupAtlas Overload
Duality.Resources Namespace


Pixmap.LookupAtlas Method (Int32, Rect)

PixmapLookupAtlas Method (Int32, Rect)
Does a safe (null-checked, clamped) pixmap Atlas lookup.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LookupAtlas(
    int index,
    out Rect region
)

Parameters

index
Type: SystemInt32
region
Type: DualityRect
See Also

Reference

Pixmap Class
LookupAtlas Overload
Duality.Resources Namespace


Pixmap.OnDisposing Method

PixmapOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap Properties

Pixmap Properties

The Pixmap type exposes the following members.

Properties
 | Name | Description
Public property | AnimCols | [GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.
Public property | AnimFrameBorder | [GET / SET] Pixel size of the border around each individual animation frame. within the image.
Public property | AnimFrames | [GET] Total number of animation frames in this Pixmap
Public property | AnimRows | [GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Atlas | [GET / SET] The Pixmaps atlas array, distinguishing different areas in pixel coordinates
 | Checkerboard | [GET] A 256x256 black and white checkerboard image.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | [GET] A Pixmap showing the Duality icon.
 | DualityIconB | [GET] A Pixmap showing the Duality icon without the text on it.
 | DualityLogoBig | A Pixmap showing the Duality logo.
 | DualityLogoMedium | A Pixmap showing the Duality logo.
 | DualityLogoSmall | A Pixmap showing the Duality logo.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Height | [GET] The Height of the actual pixel data.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | MainLayer | [GET / SET] The main PixelData layer of this Pixmap.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PixelData | [GET / SET] A list of PixelData layers.
 | White | [GET] A plain white 1x1 Pixmap. Can be used as a dummy.
Public property | Width | [GET] The Width of the actual pixel data.
Top
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.AnimCols Property

PixmapAnimCols Property
[GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimCols { get; set; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.AnimFrameBorder Property

PixmapAnimFrameBorder Property
[GET / SET] Pixel size of the border around each individual animation frame. within the image.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimFrameBorder { get; set; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.AnimFrames Property

PixmapAnimFrames Property
[GET] Total number of animation frames in this Pixmap

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimFrames { get; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.AnimRows Property

PixmapAnimRows Property
[GET / SET] Information about different animation frames contained in this Pixmap. Setting this will lead to an auto-generated atlas map according to the animation.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int AnimRows { get; set; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.Atlas Property

PixmapAtlas Property
[GET / SET] The Pixmaps atlas array, distinguishing different areas in pixel coordinates

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<Rect> Atlas { get; set; }

Property Value

Type: List Rect
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.Checkerboard Property

PixmapCheckerboard Property
[GET] A 256x256 black and white checkerboard image.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> Checkerboard { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.DualityIcon Property

PixmapDualityIcon Property
[GET] A Pixmap showing the Duality icon.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> DualityIcon { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.DualityIconB Property

PixmapDualityIconB Property
[GET] A Pixmap showing the Duality icon without the text on it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> DualityIconB { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.DualityLogoBig Property

PixmapDualityLogoBig Property
A Pixmap showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> DualityLogoBig { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.DualityLogoMedium Property

PixmapDualityLogoMedium Property
A Pixmap showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> DualityLogoMedium { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.DualityLogoSmall Property

PixmapDualityLogoSmall Property
A Pixmap showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> DualityLogoSmall { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.Height Property

PixmapHeight Property
[GET] The Height of the actual pixel data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.MainLayer Property

PixmapMainLayer Property
[GET / SET] The main PixelData layer of this Pixmap.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData MainLayer { get; set; }

Property Value

Type: PixelData
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.PixelData Property

PixmapPixelData Property
[GET / SET] A list of PixelData layers.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<PixelData> PixelData { get; set; }

Property Value

Type: List PixelData
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.White Property

PixmapWhite Property
[GET] A plain white 1x1 Pixmap. Can be used as a dummy.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Pixmap> White { get; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Pixmap.Width Property

PixmapWidth Property
[GET] The Width of the actual pixel data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; }

Property Value

Type: Int32
See Also

Reference

Pixmap Class
Duality.Resources Namespace


Prefab Class

Prefab Class
Prefab is short for "prefabricated object" and encapsulates a single GameObject that can serve as a template. When creating a GameObject out of a Prefab, it maintains a connection to it using a PrefabLink object. This ensures that changes made to the Prefab propagate to all of its instances as well. It also keeps track of Properties that have been deliberately modified in the editor and restores them after re-applying the original Prefabs data.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesPrefab

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Prefab : Resource

The Prefab type exposes the following members.

Constructors
 | Name | Description
Public method | Prefab | Creates a new, empty Prefab.
Public method | Prefab(GameObject) | Creates a new Prefab out of a GameObject.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo(GameObject) | Copies this Prefabs data to a GameObject without linking itsself to it.
Public method | CopyTo(Resource) | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | CopyTo(IEnumerableInt32, Component) | Copies a subset of this Prefabs data to a specific Component.
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | HasComponent | Returns whether this Prefab contains a Component inside a GameObject with the specified index path. It is based on this Prefabs root GameObject.
Public method | HasGameObject | Returns whether this Prefab contains a GameObject with the specified index path. It is based on this Prefabs root GameObject.
Public method | Inject | Discards previous data and injects the specified GameObject into the Prefab. The GameObject itsself will not be affected, instead a Clone of it will be used for the Prefab.
Public method | Instantiate | Creates a new instance of the Prefab. You will need to add it to a Scene in most cases.
Public method | Instantiate(Vector3, Single, Single) | Creates a new instance of the Prefab with specified world space transform values. This is a convenience method that calls Instantiate and modifies the resulting object, in case it contains a Transform Component.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | ContainsData | [GET] Returns whether this Prefab contains any data.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Top
See Also

Reference

Duality.Resources Namespace


Prefab Constructor

Prefab Constructor
Overload List
 | Name | Description
Public method | Prefab | Creates a new, empty Prefab.
Public method | Prefab(GameObject) | Creates a new Prefab out of a GameObject.
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab Constructor

Prefab Constructor
Creates a new, empty Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Prefab()
See Also

Reference

Prefab Class
Prefab Overload
Duality.Resources Namespace


Prefab Constructor (GameObject)

Prefab Constructor (GameObject)
Creates a new Prefab out of a GameObject.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Prefab(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
See Also

Reference

Prefab Class
Prefab Overload
Duality.Resources Namespace


Prefab Fields

Prefab Fields

The Prefab type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab Methods

Prefab Methods

The Prefab type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo(GameObject) | Copies this Prefabs data to a GameObject without linking itsself to it.
Public method | CopyTo(Resource) | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | CopyTo(IEnumerableInt32, Component) | Copies a subset of this Prefabs data to a specific Component.
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | HasComponent | Returns whether this Prefab contains a Component inside a GameObject with the specified index path. It is based on this Prefabs root GameObject.
Public method | HasGameObject | Returns whether this Prefab contains a GameObject with the specified index path. It is based on this Prefabs root GameObject.
Public method | Inject | Discards previous data and injects the specified GameObject into the Prefab. The GameObject itsself will not be affected, instead a Clone of it will be used for the Prefab.
Public method | Instantiate | Creates a new instance of the Prefab. You will need to add it to a Scene in most cases.
Public method | Instantiate(Vector3, Single, Single) | Creates a new instance of the Prefab with specified world space transform values. This is a convenience method that calls Instantiate and modifies the resulting object, in case it contains a Transform Component.
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.CopyTo Method

PrefabCopyTo Method
Overload List
 | Name | Description
Public method | CopyTo(GameObject) | Copies this Prefabs data to a GameObject without linking itsself to it.
Public method | CopyTo(Resource) | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | CopyTo(IEnumerableInt32, Component) | Copies a subset of this Prefabs data to a specific Component.
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.CopyTo Method (GameObject)

PrefabCopyTo Method (GameObject)
Copies this Prefabs data to a GameObject without linking itsself to it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
The GameObject to which the Prefabs data is copied.
See Also

Reference

Prefab Class
CopyTo Overload
Duality.Resources Namespace


Prefab.CopyTo Method (IEnumerable(Int32), Component)

PrefabCopyTo Method (IEnumerableInt32, Component)
Copies a subset of this Prefabs data to a specific Component.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void CopyTo(
    IEnumerable<int> baseObjAddress,
    Component target
)

Parameters

baseObjAddress
Type: System.Collections.GenericIEnumerable Int32
The GameObject IndexPath to locate the source Component
target
Type: DualityComponent
The Component to which the Prefabs data is copied.
See Also

Reference

Prefab Class
CopyTo Overload
Duality.Resources Namespace


Prefab.HasComponent Method

PrefabHasComponent Method
Returns whether this Prefab contains a Component inside a GameObject with the specified index path. It is based on this Prefabs root GameObject.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool HasComponent(
    IEnumerable<int> gameObjIndexPath,
    Type cmpType
)

Parameters

gameObjIndexPath
Type: System.Collections.GenericIEnumerable Int32
The index path at which to search for a GameObject.
cmpType
Type: SystemType
The Component type to search for inside the found GameObject.

Return Value

Type: Boolean
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.HasGameObject Method

PrefabHasGameObject Method
Returns whether this Prefab contains a GameObject with the specified index path. It is based on this Prefabs root GameObject.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool HasGameObject(
    IEnumerable<int> indexPath
)

Parameters

indexPath
Type: System.Collections.GenericIEnumerable Int32
The index path at which to search for a GameObject.

Return Value

Type: Boolean
True, if such child GameObjects exists, false if not.
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.Inject Method

PrefabInject Method
Discards previous data and injects the specified GameObject into the Prefab. The GameObject itsself will not be affected, instead a Clone of it will be used for the Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Inject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
The object to inject as Prefab root object.
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.Instantiate Method

PrefabInstantiate Method
Overload List
 | Name | Description
Public method | Instantiate | Creates a new instance of the Prefab. You will need to add it to a Scene in most cases.
Public method | Instantiate(Vector3, Single, Single) | Creates a new instance of the Prefab with specified world space transform values. This is a convenience method that calls Instantiate and modifies the resulting object, in case it contains a Transform Component.
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.Instantiate Method

PrefabInstantiate Method
Creates a new instance of the Prefab. You will need to add it to a Scene in most cases.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Instantiate()

Return Value

Type: GameObject
See Also

Reference

Prefab Class
Instantiate Overload
Duality.Resources Namespace


Prefab.Instantiate Method (Vector3, Single, Single)

PrefabInstantiate Method (Vector3, Single, Single)
Creates a new instance of the Prefab with specified world space transform values. This is a convenience method that calls Instantiate and modifies the resulting object, in case it contains a Transform Component.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Instantiate(
    Vector3 position,
    float angle = 0f,
    float scale = 1f
)

Parameters

position
Type: DualityVector3
angle (Optional)
Type: SystemSingle
scale (Optional)
Type: SystemSingle

Return Value

Type: GameObject
See Also

Reference

Prefab Class
Instantiate Overload
Duality.Resources Namespace


Prefab.OnLoaded Method

PrefabOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab Properties

Prefab Properties

The Prefab type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | ContainsData | [GET] Returns whether this Prefab contains any data.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Top
See Also

Reference

Prefab Class
Duality.Resources Namespace


Prefab.ContainsData Property

PrefabContainsData Property
[GET] Returns whether this Prefab contains any data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool ContainsData { get; }

Property Value

Type: Boolean
See Also

Reference

Prefab Class
Duality.Resources Namespace


PrefabLink Class

PrefabLink Class
Represents a GameObjects connection to the Prefab it has been instanciated from.
Inheritance Hierarchy
SystemObject
Duality.ResourcesPrefabLink

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class PrefabLink

The PrefabLink type exposes the following members.

Constructors
 | Name | Description
Public method | PrefabLink | Creates a new PrefabLink, connecting a GameObject to a Prefab.
Top
Methods
 | Name | Description
Public method | AffectsObject(Component) | Returns whether a specific object is affected by this PrefabLink.
Public method | AffectsObject(GameObject) | Returns whether a specific object is affected by this PrefabLink.
Public method | Apply | Applies both Prefab and change list to this PrefabLinks GameObject.
 | ApplyAllLinks | Applies all PrefabLinks in a set of GameObjects.
Public method | ApplyChanges | Applies this PrefabLinks change list to its GameObject. This will restore all deliberate modifications (made in the editor) of the GameObjects Properties after linking it to the Prefab.
Public method | ApplyPrefab | Applies the Prefab to this PrefabLinks GameObject. This will overwrite all of its existing data and establish the state as defined in the Prefab.
Public method | ClearChanges | Clears the change list.
Public method | ClearChanges(GameObject, TypeInfo, PropertyInfo) | Clears the change list for certain objects
Public method | Clone | Clones the PrefabLink.
Public method | Clone(GameObject) | Clones the PrefabLink, but targets a different GameObject.
Public method | Clone(GameObject, ContentRefPrefab) | Clones the PrefabLink, but targets a different GameObject and Prefab.
Public method | HasChange | Returns whether there is a specific change list entry.
Public method | PopChange | Removes an existing change list entry.
Public method | PushChange(Object, PropertyInfo) | Creates a new change list entry.
Public method | PushChange(Object, PropertyInfo, Object) | Creates a new change list entry.
Public method | RelocateChanges | Relocates the internal change list from this PrefabLink to a different, hierarchially lower PrefabLink.
Public method | UpdateChanges | Updates all existing change list entries by the GameObjects current Property values.
Top
Properties
 | Name | Description
Public property | Obj | [GET] The GameObject this PrefabLink belongs to.
Public property | ParentLink | [GET] If the connected GameObject is itsself contained within a hierarchy of GameObjects which is affected by a higher PrefabLink, this link will be returned.
Public property | Prefab | [GET] The Prefab to which the GameObject is connected to.
Top
See Also

Reference

Duality.Resources Namespace
PrefabLinkPrefab
DualityGameObject


PrefabLink Constructor

PrefabLink Constructor
Creates a new PrefabLink, connecting a GameObject to a Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink(
    GameObject obj,
    ContentRef<Prefab> prefab
)

Parameters

obj
Type: DualityGameObject
The GameObject to link.
prefab
Type: DualityContentRef Prefab
The Prefab to connect the GameObject with.
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink Methods

PrefabLink Methods

The PrefabLink type exposes the following members.

Methods
 | Name | Description
Public method | AffectsObject(Component) | Returns whether a specific object is affected by this PrefabLink.
Public method | AffectsObject(GameObject) | Returns whether a specific object is affected by this PrefabLink.
Public method | Apply | Applies both Prefab and change list to this PrefabLinks GameObject.
 | ApplyAllLinks | Applies all PrefabLinks in a set of GameObjects.
Public method | ApplyChanges | Applies this PrefabLinks change list to its GameObject. This will restore all deliberate modifications (made in the editor) of the GameObjects Properties after linking it to the Prefab.
Public method | ApplyPrefab | Applies the Prefab to this PrefabLinks GameObject. This will overwrite all of its existing data and establish the state as defined in the Prefab.
Public method | ClearChanges | Clears the change list.
Public method | ClearChanges(GameObject, TypeInfo, PropertyInfo) | Clears the change list for certain objects
Public method | Clone | Clones the PrefabLink.
Public method | Clone(GameObject) | Clones the PrefabLink, but targets a different GameObject.
Public method | Clone(GameObject, ContentRefPrefab) | Clones the PrefabLink, but targets a different GameObject and Prefab.
Public method | HasChange | Returns whether there is a specific change list entry.
Public method | PopChange | Removes an existing change list entry.
Public method | PushChange(Object, PropertyInfo) | Creates a new change list entry.
Public method | PushChange(Object, PropertyInfo, Object) | Creates a new change list entry.
Public method | RelocateChanges | Relocates the internal change list from this PrefabLink to a different, hierarchially lower PrefabLink.
Public method | UpdateChanges | Updates all existing change list entries by the GameObjects current Property values.
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.AffectsObject Method

PrefabLinkAffectsObject Method
Overload List
 | Name | Description
Public method | AffectsObject(Component) | Returns whether a specific object is affected by this PrefabLink.
Public method | AffectsObject(GameObject) | Returns whether a specific object is affected by this PrefabLink.
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.AffectsObject Method (Component)

PrefabLinkAffectsObject Method (Component)
Returns whether a specific object is affected by this PrefabLink.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AffectsObject(
    Component cmp
)

Parameters

cmp
Type: DualityComponent

Return Value

Type: Boolean
See Also

Reference

PrefabLink Class
AffectsObject Overload
Duality.Resources Namespace


PrefabLink.AffectsObject Method (GameObject)

PrefabLinkAffectsObject Method (GameObject)
Returns whether a specific object is affected by this PrefabLink.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AffectsObject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject

Return Value

Type: Boolean
See Also

Reference

PrefabLink Class
AffectsObject Overload
Duality.Resources Namespace


PrefabLink.Apply Method

PrefabLinkApply Method
Applies both Prefab and change list to this PrefabLinks GameObject.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Apply()
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ApplyAllLinks Method

PrefabLinkApplyAllLinks Method
Applies all PrefabLinks in a set of GameObjects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static HashSet<PrefabLink> ApplyAllLinks(
    IEnumerable<GameObject> objEnum,
    Predicate<PrefabLink> predicate = null
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
An enumeration of all GameObjects containing PrefabLinks that are to apply.
predicate (Optional)
Type: SystemPredicate PrefabLink
An optional predicate. If set, only PrefabLinks meeting its requirements are applied.

Return Value

Type: HashSet PrefabLink
A List of all PrefabLinks that have been applied.
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ApplyChanges Method

PrefabLinkApplyChanges Method
Applies this PrefabLinks change list to its GameObject. This will restore all deliberate modifications (made in the editor) of the GameObjects Properties after linking it to the Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyChanges()
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ApplyPrefab Method

PrefabLinkApplyPrefab Method
Applies the Prefab to this PrefabLinks GameObject. This will overwrite all of its existing data and establish the state as defined in the Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyPrefab()
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ClearChanges Method

PrefabLinkClearChanges Method
Overload List
 | Name | Description
Public method | ClearChanges | Clears the change list.
Public method | ClearChanges(GameObject, TypeInfo, PropertyInfo) | Clears the change list for certain objects
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ClearChanges Method

PrefabLinkClearChanges Method
Clears the change list.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearChanges()
See Also

Reference

PrefabLink Class
ClearChanges Overload
Duality.Resources Namespace


PrefabLink.ClearChanges Method (GameObject, TypeInfo, PropertyInfo)

PrefabLinkClearChanges Method (GameObject, TypeInfo, PropertyInfo)
Clears the change list for certain objects

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearChanges(
    GameObject targetObj,
    TypeInfo cmpType,
    PropertyInfo prop
)

Parameters

targetObj
Type: DualityGameObject
cmpType
Type: System.ReflectionTypeInfo
prop
Type: System.ReflectionPropertyInfo
See Also

Reference

PrefabLink Class
ClearChanges Overload
Duality.Resources Namespace


PrefabLink.Clone Method

PrefabLinkClone Method
Overload List
 | Name | Description
Public method | Clone | Clones the PrefabLink.
Public method | Clone(GameObject) | Clones the PrefabLink, but targets a different GameObject.
Public method | Clone(GameObject, ContentRefPrefab) | Clones the PrefabLink, but targets a different GameObject and Prefab.
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.Clone Method

PrefabLinkClone Method
Clones the PrefabLink.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink Clone()

Return Value

Type: PrefabLink
A cloned version of this PrefabLink
See Also

Reference

PrefabLink Class
Clone Overload
Duality.Resources Namespace


PrefabLink.Clone Method (GameObject)

PrefabLinkClone Method (GameObject)
Clones the PrefabLink, but targets a different GameObject.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink Clone(
    GameObject newObj
)

Parameters

newObj
Type: DualityGameObject
The GameObject which the clone is connected to.

Return Value

Type: PrefabLink
A cloned version of this PrefabLink
See Also

Reference

PrefabLink Class
Clone Overload
Duality.Resources Namespace


PrefabLink.Clone Method (GameObject, ContentRef(Prefab))

PrefabLinkClone Method (GameObject, ContentRefPrefab)
Clones the PrefabLink, but targets a different GameObject and Prefab.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink Clone(
    GameObject newObj,
    ContentRef<Prefab> newPrefab
)

Parameters

newObj
Type: DualityGameObject
The GameObject which the clone is connected to.
newPrefab
Type: DualityContentRef Prefab
The Prefab which the clone will connect its GameObject to.

Return Value

Type: PrefabLink
A cloned version of this PrefabLink
See Also

Reference

PrefabLink Class
Clone Overload
Duality.Resources Namespace


PrefabLink.HasChange Method

PrefabLinkHasChange Method
Returns whether there is a specific change list entry.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool HasChange(
    Object target,
    PropertyInfo prop
)

Parameters

target
Type: SystemObject
The target object in which the change has been made. Must be a GameObject or Component.
prop
Type: System.ReflectionPropertyInfo
The target objects Property that has been changed.

Return Value

Type: Boolean
True, if such change list entry exists, false if not.
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.PopChange Method

PrefabLinkPopChange Method
Removes an existing change list entry.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PopChange(
    Object target,
    PropertyInfo prop
)

Parameters

target
Type: SystemObject
The target object in which the change has been made. Must be a GameObject or Component.
prop
Type: System.ReflectionPropertyInfo
The target objects Property that has been changed.
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.PushChange Method

PrefabLinkPushChange Method
Overload List
 | Name | Description
Public method | PushChange(Object, PropertyInfo) | Creates a new change list entry.
Public method | PushChange(Object, PropertyInfo, Object) | Creates a new change list entry.
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.PushChange Method (Object, PropertyInfo)

PrefabLinkPushChange Method (Object, PropertyInfo)
Creates a new change list entry.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PushChange(
    Object target,
    PropertyInfo prop
)

Parameters

target
Type: SystemObject
The target object in which the change has been made. Must be a GameObject or Component.
prop
Type: System.ReflectionPropertyInfo
The target objects Property that has been changed.
See Also

Reference

PrefabLink Class
PushChange Overload
Duality.Resources Namespace


PrefabLink.PushChange Method (Object, PropertyInfo, Object)

PrefabLinkPushChange Method (Object, PropertyInfo, Object)
Creates a new change list entry.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PushChange(
    Object target,
    PropertyInfo prop,
    Object value
)

Parameters

target
Type: SystemObject
The target object in which the change has been made. Must be a GameObject or Component.
prop
Type: System.ReflectionPropertyInfo
The target objects Property that has been changed.
value
Type: SystemObject
The value to which the specified Property has been changed to.
See Also

Reference

PrefabLink Class
PushChange Overload
Duality.Resources Namespace


PrefabLink.RelocateChanges Method

PrefabLinkRelocateChanges Method
Relocates the internal change list from this PrefabLink to a different, hierarchially lower PrefabLink.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RelocateChanges(
    PrefabLink other
)

Parameters

other
Type: Duality.ResourcesPrefabLink
The PrefabLink to which to relocate changes. It needs to be hierarchially lower than this one for the relocation to succeed.
Remarks

In general, each PrefabLink is responsible for all hierarchially lower GameObjects. If one of them has a PrefabLink on its own, then the higher PrefabLinks responsibility ends there.

Change relocation is done when linking an existing GameObject to a Prefab although it is already affected by a hierarchially higher PrefabLink. In order to prevent both PrefabLinks to interfere with each other, all higher PrefabLink change list entries referring to that GameObject are relocated to the new, lower PrefabLink that is specifically targetting it.

This way, the above responsibility guideline remains applicable.

See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.UpdateChanges Method

PrefabLinkUpdateChanges Method
Updates all existing change list entries by the GameObjects current Property values.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void UpdateChanges()
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink Properties

PrefabLink Properties

The PrefabLink type exposes the following members.

Properties
 | Name | Description
Public property | Obj | [GET] The GameObject this PrefabLink belongs to.
Public property | ParentLink | [GET] If the connected GameObject is itsself contained within a hierarchy of GameObjects which is affected by a higher PrefabLink, this link will be returned.
Public property | Prefab | [GET] The Prefab to which the GameObject is connected to.
Top
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.Obj Property

PrefabLinkObj Property
[GET] The GameObject this PrefabLink belongs to.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject Obj { get; }

Property Value

Type: GameObject
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


PrefabLink.ParentLink Property

PrefabLinkParentLink Property
[GET] If the connected GameObject is itsself contained within a hierarchy of GameObjects which is affected by a higher PrefabLink, this link will be returned.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PrefabLink ParentLink { get; }

Property Value

Type: PrefabLink
See Also

Reference

PrefabLink Class
Duality.Resources Namespace
GameObjectAffectedByPrefabLink


PrefabLink.Prefab Property

PrefabLinkPrefab Property
[GET] The Prefab to which the GameObject is connected to.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Prefab> Prefab { get; }

Property Value

Type: ContentRef Prefab
See Also

Reference

PrefabLink Class
Duality.Resources Namespace


RenderTarget Class

RenderTarget Class
Instead of rendering to screen, RenderTargets can serve as an alternative drawing surface for a Camera. The image is applied to one or several Textures. By default, only the first attached Texture is actually used, but you can use a custom FragmentShader to use all available Textures for storing information.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesRenderTarget

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class RenderTarget : Resource

The RenderTarget type exposes the following members.

Constructors
 | Name | Description
Public method | RenderTarget | Creates a new, empty RenderTarget
Public method | RenderTarget(AAQuality, ContentRefTexture) | Creates a new RenderTarget based on a set of Textures
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Protected method | FreeNativeRes | Frees up any native resources that this RenderTarget might have occupied.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetPixelData(Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Protected method | SetupNativeRes | Sets up all necessary native resources for this RenderTarget.
Public method | SetupTarget | Sets up this RenderTarget, so it can be actively used. This is done automatically - unless one of the target textures gets resized or set up with different parameters after this target was already initialized, you shouldn't need to call this.
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Height | [GET] Height of this RenderTarget. This values is derived by its Targets.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Multisampling | [GET / SET] Whether this RenderTarget is multisampled.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native rendering target. You shouldn't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Targets | [GET / SET] An array of Textures used as data destination by this RenderTarget.
Public property | UVRatio | [GET] UVRatio of this RenderTarget. This values is derived by its Targets.
Public property | Width | [GET] Width of this RenderTarget. This values is derived by its Targets.
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesTexture


RenderTarget Constructor

RenderTarget Constructor
Overload List
 | Name | Description
Public method | RenderTarget | Creates a new, empty RenderTarget
Public method | RenderTarget(AAQuality, ContentRefTexture) | Creates a new RenderTarget based on a set of Textures
Top
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget Constructor

RenderTarget Constructor
Creates a new, empty RenderTarget

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderTarget()
See Also

Reference

RenderTarget Class
RenderTarget Overload
Duality.Resources Namespace


RenderTarget Constructor (AAQuality, ContentRef(Texture)[])

RenderTarget Constructor (AAQuality, ContentRefTexture)
Creates a new RenderTarget based on a set of Textures

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public RenderTarget(
    AAQuality multisampling,
    params ContentRef<Texture>[] targets
)

Parameters

multisampling
Type: DualityAAQuality
The level of multisampling that is requested from this RenderTarget.
targets
Type: DualityContentRef Texture
An array of Textures used as data destination.
See Also

Reference

RenderTarget Class
RenderTarget Overload
Duality.Resources Namespace


RenderTarget Fields

RenderTarget Fields

The RenderTarget type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget Methods

RenderTarget Methods

The RenderTarget type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Protected method | FreeNativeRes | Frees up any native resources that this RenderTarget might have occupied.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetPixelData(Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Protected method | SetupNativeRes | Sets up all necessary native resources for this RenderTarget.
Public method | SetupTarget | Sets up this RenderTarget, so it can be actively used. This is done automatically - unless one of the target textures gets resized or set up with different parameters after this target was already initialized, you shouldn't need to call this.
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.FreeNativeRes Method

RenderTargetFreeNativeRes Method
Frees up any native resources that this RenderTarget might have occupied.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void FreeNativeRes()
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.GetPixelData Method

RenderTargetGetPixelData Method
Overload List
 | Name | Description
Public method | GetPixelData(Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData, Int32, Int32, Int32, Int32, Int32) | Retrieves the pixel data that is currently stored in video memory.
Top
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.GetPixelData Method (Int32, Int32, Int32, Int32, Int32)

RenderTargetGetPixelData Method (Int32, Int32, Int32, Int32, Int32)
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData GetPixelData(
    int targetIndex = 0,
    int x = 0,
    int y = 0,
    int width = -1,
    int height = -1
)

Parameters

targetIndex (Optional)
Type: SystemInt32
The Targets index to read from.
x (Optional)
Type: SystemInt32
The x position of the rectangular area to read.
y (Optional)
Type: SystemInt32
The y position of the rectangular area to read.
width (Optional)
Type: SystemInt32
The width of the rectangular area to read. Defaults to the RenderTarget Width.
height (Optional)
Type: SystemInt32
The height of the rectangular area to read. Defaults to the RenderTarget Height.

Return Value

Type: PixelData
See Also

Reference

RenderTarget Class
GetPixelData Overload
Duality.Resources Namespace


RenderTarget.GetPixelData(T) Method (T[], Int32, Int32, Int32, Int32, Int32)

RenderTargetGetPixelDataT Method (T, Int32, Int32, Int32, Int32, Int32)
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetPixelData<T>(
    T[] buffer,
    int targetIndex = 0,
    int x = 0,
    int y = 0,
    int width = -1,
    int height = -1
)
where T : struct, new()

Parameters

buffer
Type: T
The buffer (Rgba8 format) to store all the pixel data in. Its byte length needs to be at least width * height * 4.
targetIndex (Optional)
Type: SystemInt32
The Targets index to read from.
x (Optional)
Type: SystemInt32
The x position of the rectangular area to read.
y (Optional)
Type: SystemInt32
The y position of the rectangular area to read.
width (Optional)
Type: SystemInt32
The width of the rectangular area to read. Defaults to the RenderTarget Width.
height (Optional)
Type: SystemInt32
The height of the rectangular area to read. Defaults to the RenderTarget Height.

Type Parameters

T

Return Value

Type: Int32
The number of bytes that were read.
See Also

Reference

RenderTarget Class
GetPixelData Overload
Duality.Resources Namespace


RenderTarget.GetPixelData Method (PixelData, Int32, Int32, Int32, Int32, Int32)

RenderTargetGetPixelData Method (PixelData, Int32, Int32, Int32, Int32, Int32)
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void GetPixelData(
    PixelData target,
    int targetIndex = 0,
    int x = 0,
    int y = 0,
    int width = -1,
    int height = -1
)

Parameters

target
Type: Duality.DrawingPixelData
The target image to store the retrieved pixel data in.
targetIndex (Optional)
Type: SystemInt32
The Targets index to read from.
x (Optional)
Type: SystemInt32
The x position of the rectangular area to read.
y (Optional)
Type: SystemInt32
The y position of the rectangular area to read.
width (Optional)
Type: SystemInt32
The width of the rectangular area to read. Defaults to the RenderTarget Width.
height (Optional)
Type: SystemInt32
The height of the rectangular area to read. Defaults to the RenderTarget Height.
See Also

Reference

RenderTarget Class
GetPixelData Overload
Duality.Resources Namespace


RenderTarget.OnCopyDataTo Method

RenderTargetOnCopyDataTo Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.OnDisposing Method

RenderTargetOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.OnLoaded Method

RenderTargetOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.SetupNativeRes Method

RenderTargetSetupNativeRes Method
Sets up all necessary native resources for this RenderTarget.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void SetupNativeRes()
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.SetupTarget Method

RenderTargetSetupTarget Method
Sets up this RenderTarget, so it can be actively used. This is done automatically - unless one of the target textures gets resized or set up with different parameters after this target was already initialized, you shouldn't need to call this.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void SetupTarget()
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget Properties

RenderTarget Properties

The RenderTarget type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | Height | [GET] Height of this RenderTarget. This values is derived by its Targets.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Multisampling | [GET / SET] Whether this RenderTarget is multisampled.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native rendering target. You shouldn't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | Targets | [GET / SET] An array of Textures used as data destination by this RenderTarget.
Public property | UVRatio | [GET] UVRatio of this RenderTarget. This values is derived by its Targets.
Public property | Width | [GET] Width of this RenderTarget. This values is derived by its Targets.
Top
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.Height Property

RenderTargetHeight Property
[GET] Height of this RenderTarget. This values is derived by its Targets.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Height { get; }

Property Value

Type: Int32
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.Multisampling Property

RenderTargetMultisampling Property
[GET / SET] Whether this RenderTarget is multisampled.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AAQuality Multisampling { get; set; }

Property Value

Type: AAQuality
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.Native Property

RenderTargetNative Property
[GET] The backends native rendering target. You shouldn't use this unless you know exactly what you're doing.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeRenderTarget Native { get; }

Property Value

Type: INativeRenderTarget
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.Targets Property

RenderTargetTargets Property
[GET / SET] An array of Textures used as data destination by this RenderTarget.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Texture>[] Targets { get; set; }

Property Value

Type: ContentRef Texture
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.UVRatio Property

RenderTargetUVRatio Property
[GET] UVRatio of this RenderTarget. This values is derived by its Targets.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 UVRatio { get; }

Property Value

Type: Vector2
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


RenderTarget.Width Property

RenderTargetWidth Property
[GET] Width of this RenderTarget. This values is derived by its Targets.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int Width { get; }

Property Value

Type: Int32
See Also

Reference

RenderTarget Class
Duality.Resources Namespace


Scene Class

Scene Class
A Scene encapsulates an organized set of GameObjects and provides update-, rendering- and maintenance functionality. In Duality, there is always exactly one Scene Current which represents a level, gamestate or a combination of both, depending on you own design.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesScene

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class Scene : Resource

The Scene type exposes the following members.

Constructors
 | Name | Description
Public method | Scene | Creates a new, empty scene which does not contain any GameObjects.
Top
Methods
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects and all of their children.
Public method | Append | Appends a cloned version of the specified Scenes contents to this Scene.
Public method | ApplyPrefabLinks | Applies all PrefabLinks contained withing this Scenes GameObjects.
 | AwakePhysics | Awakes all currently existing physical objects.
Public method | BreakPrefabLinks | Breaks all PrefabLinks contained withing this Scenes GameObjects.
Public method | Clear | Clears the Scene, unregistering all GameObjects. This does not dispose them.
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Consume | Appends the specified Scene's contents to this Scene and consumes the specified Scene.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | FindComponent(Type, Boolean) | Finds a single Component of the specified type in this Scene.
Public method | FindComponentT(Boolean) | Finds a single Component of the specified type in this Scene.
Public method | FindComponents(Type) | Finds all Components of the specified type in this Scene.
Public method | FindComponentsT | Finds all Components of the specified type in this Scene.
Public method | FindGameObject(String, Boolean) | Finds a single GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObject(Type, Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Public method | FindGameObjectT(Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Public method | FindGameObjects(String) | Finds all GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObjects(Type) | Finds all GameObjects in the Scene which have a Component of the specified type.
Public method | FindGameObjectsT | Finds all GameObjects in the Scene which have a Component of the specified type.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | (Overrides ResourceOnSaved(String).)
Protected method | OnSaving | (Overrides ResourceOnSaving(String).)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
 | Reload | Reloads the current Scene or schedules it for reload at the end of the frame, depending on whether it is considered safe to do so immediately. Similar to SwitchTo(ContentRefScene, Boolean) with regard to execution planning.
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects and all of their children.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
 | SwitchTo | Switches to the specified Scene, which will become the new current one. By default, this method does not guarantee to perform the Scene switch immediately, but may defer the switch to the end of the current update cycle.
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | ActiveObjects | [GET] Enumerates all registered objects that are currently active.
Public property | ActiveRootObjects | [GET] Enumerates all RootObjects that are currently active.
Public property | AllObjects | [GET] Enumerates all registered objects.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Current | [GET / SET] The Scene that is currently active i.e. updated and rendered. This is never null. You may assign null in order to leave the current Scene and enter en empty dummy Scene.
 | CurrentPath | [GET] The Resource file path of the current Scene.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | GlobalGravity | [GET / SET] Global gravity force that is applied to all objects that obey the laws of physics.
Public property | IsCurrent | [GET] Returns whether this Scene is Current.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsEmpty | [GET] Returns whether this Scene is completely empty.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | IsSwitching | [GET] Returns whether Current is in a transition between two different states, i.e. whether the current Scene is being changed right now.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | PhysicsAlpha | [GET] When using fixed-timestep physics, the alpha value [0.0 - 1.0] indicates how complete the next step is. This is used for linear interpolation inbetween fixed physics steps.
 | PhysicsFixedTime | [GET] Is fixed-timestep physics calculation currently active?
 | PhysicsWorld | [GET] Returns the current physics world.
Public property | RootObjects | [GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.
Public property | VisibilityStrategy | [GET / SET] The strategy that is used to determine which renderers are visible.
Top
Events
Name | Description
ComponentAdded | Fired when a Component has been added to a GameObject that is registered in the current Scene.
ComponentRemoving | Fired when a Component has been removed from a GameObject that is registered in the current Scene.
Entered | Fired right after entering the (now) current Scene.
GameObjectAdded | Fired when a GameObject has been registered in the current Scene.
GameObjectParentChanged | Fired when a GameObjects parent object has been changed in the current Scene.
GameObjectRemoved | Fired when a GameObject has been unregistered from the current Scene.
Leaving | Fired just before leaving the current Scene.
Top
See Also

Reference

Duality.Resources Namespace


Scene Constructor

Scene Constructor
Creates a new, empty scene which does not contain any GameObjects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Scene()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene Fields

Scene Fields

The Scene type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene Methods

Scene Methods

The Scene type exposes the following members.

Methods
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects and all of their children.
Public method | Append | Appends a cloned version of the specified Scenes contents to this Scene.
Public method | ApplyPrefabLinks | Applies all PrefabLinks contained withing this Scenes GameObjects.
 | AwakePhysics | Awakes all currently existing physical objects.
Public method | BreakPrefabLinks | Breaks all PrefabLinks contained withing this Scenes GameObjects.
Public method | Clear | Clears the Scene, unregistering all GameObjects. This does not dispose them.
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Consume | Appends the specified Scene's contents to this Scene and consumes the specified Scene.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | FindComponent(Type, Boolean) | Finds a single Component of the specified type in this Scene.
Public method | FindComponentT(Boolean) | Finds a single Component of the specified type in this Scene.
Public method | FindComponents(Type) | Finds all Components of the specified type in this Scene.
Public method | FindComponentsT | Finds all Components of the specified type in this Scene.
Public method | FindGameObject(String, Boolean) | Finds a single GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObject(Type, Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Public method | FindGameObjectT(Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Public method | FindGameObjects(String) | Finds all GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObjects(Type) | Finds all GameObjects in the Scene which have a Component of the specified type.
Public method | FindGameObjectsT | Finds all GameObjects in the Scene which have a Component of the specified type.
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | (Overrides ResourceOnSaved(String).)
Protected method | OnSaving | (Overrides ResourceOnSaving(String).)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
 | Reload | Reloads the current Scene or schedules it for reload at the end of the frame, depending on whether it is considered safe to do so immediately. Similar to SwitchTo(ContentRefScene, Boolean) with regard to execution planning.
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects and all of their children.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
 | SwitchTo | Switches to the specified Scene, which will become the new current one. By default, this method does not guarantee to perform the Scene switch immediately, but may defer the switch to the end of the current update cycle.
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.AddObject Method

SceneAddObject Method
Overload List
 | Name | Description
Public method | AddObject(GameObject) | Registers a GameObject and all of its children.
Public method | AddObject(IEnumerableGameObject) | Registers a set of GameObjects and all of their children.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.AddObject Method (GameObject)

SceneAddObject Method (GameObject)
Registers a GameObject and all of its children.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddObject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
See Also

Reference

Scene Class
AddObject Overload
Duality.Resources Namespace


Scene.AddObject Method (IEnumerable(GameObject))

SceneAddObject Method (IEnumerableGameObject)
Registers a set of GameObjects and all of their children.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddObject(
    IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
See Also

Reference

Scene Class
AddObject Overload
Duality.Resources Namespace


Scene.Append Method

SceneAppend Method
Appends a cloned version of the specified Scenes contents to this Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Append(
    ContentRef<Scene> scene
)

Parameters

scene
Type: DualityContentRef Scene
The source Scene.
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.ApplyPrefabLinks Method

SceneApplyPrefabLinks Method
Applies all PrefabLinks contained withing this Scenes GameObjects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ApplyPrefabLinks()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.AwakePhysics Method

SceneAwakePhysics Method
Awakes all currently existing physical objects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void AwakePhysics()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.BreakPrefabLinks Method

SceneBreakPrefabLinks Method
Breaks all PrefabLinks contained withing this Scenes GameObjects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void BreakPrefabLinks()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Clear Method

SceneClear Method
Clears the Scene, unregistering all GameObjects. This does not dispose them.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Consume Method

SceneConsume Method
Appends the specified Scene's contents to this Scene and consumes the specified Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Consume(
    ContentRef<Scene> scene
)

Parameters

scene
Type: DualityContentRef Scene
The source Scene.
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.FindComponent Method

SceneFindComponent Method
Overload List
 | Name | Description
Public method | FindComponentT(Boolean) | Finds a single Component of the specified type in this Scene.
Public method | FindComponent(Type, Boolean) | Finds a single Component of the specified type in this Scene.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.FindComponent(T) Method (Boolean)

SceneFindComponentT Method (Boolean)
Finds a single Component of the specified type in this Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T FindComponent<T>(
    bool activeOnly = true
)
where T : class

Parameters

activeOnly (Optional)
Type: SystemBoolean

Type Parameters

T

Return Value

Type: T
See Also

Reference

Scene Class
FindComponent Overload
Duality.Resources Namespace


Scene.FindComponent Method (Type, Boolean)

SceneFindComponent Method (Type, Boolean)
Finds a single Component of the specified type in this Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Component FindComponent(
    Type type,
    bool activeOnly = true
)

Parameters

type
Type: SystemType
activeOnly (Optional)
Type: SystemBoolean

Return Value

Type: Component
See Also

Reference

Scene Class
FindComponent Overload
Duality.Resources Namespace


Scene.FindComponents Method

SceneFindComponents Method
Overload List
 | Name | Description
Public method | FindComponentsT | Finds all Components of the specified type in this Scene.
Public method | FindComponents(Type) | Finds all Components of the specified type in this Scene.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.FindComponents(T) Method

SceneFindComponentsT Method
Finds all Components of the specified type in this Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<T> FindComponents<T>()
where T : class

Type Parameters

T

Return Value

Type: IEnumerable T
See Also

Reference

Scene Class
FindComponents Overload
Duality.Resources Namespace


Scene.FindComponents Method (Type)

SceneFindComponents Method (Type)
Finds all Components of the specified type in this Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<Component> FindComponents(
    Type type
)

Parameters

type
Type: SystemType

Return Value

Type: IEnumerable Component
See Also

Reference

Scene Class
FindComponents Overload
Duality.Resources Namespace


Scene.FindGameObject Method

SceneFindGameObject Method
Overload List
 | Name | Description
Public method | FindGameObjectT(Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Public method | FindGameObject(String, Boolean) | Finds a single GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObject(Type, Boolean) | Finds a single GameObject in the Scene that has a Component of the specified type.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.FindGameObject(T) Method (Boolean)

SceneFindGameObjectT Method (Boolean)
Finds a single GameObject in the Scene that has a Component of the specified type.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject FindGameObject<T>(
    bool activeOnly = true
)
where T : class

Parameters

activeOnly (Optional)
Type: SystemBoolean

Type Parameters

T

Return Value

Type: GameObject
See Also

Reference

Scene Class
FindGameObject Overload
Duality.Resources Namespace


Scene.FindGameObject Method (String, Boolean)

SceneFindGameObject Method (String, Boolean)
Finds a single GameObjects in the Scene that match the specified name or name path.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject FindGameObject(
    string name,
    bool activeOnly = true
)

Parameters

name
Type: SystemString
activeOnly (Optional)
Type: SystemBoolean

Return Value

Type: GameObject
See Also

Reference

Scene Class
FindGameObject Overload
Duality.Resources Namespace


Scene.FindGameObject Method (Type, Boolean)

SceneFindGameObject Method (Type, Boolean)
Finds a single GameObject in the Scene that has a Component of the specified type.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GameObject FindGameObject(
    Type hasComponentOfType,
    bool activeOnly = true
)

Parameters

hasComponentOfType
Type: SystemType
activeOnly (Optional)
Type: SystemBoolean

Return Value

Type: GameObject
See Also

Reference

Scene Class
FindGameObject Overload
Duality.Resources Namespace


Scene.FindGameObjects Method

SceneFindGameObjects Method
Overload List
 | Name | Description
Public method | FindGameObjectsT | Finds all GameObjects in the Scene which have a Component of the specified type.
Public method | FindGameObjects(String) | Finds all GameObjects in the Scene that match the specified name or name path.
Public method | FindGameObjects(Type) | Finds all GameObjects in the Scene which have a Component of the specified type.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.FindGameObjects(T) Method

SceneFindGameObjectsT Method
Finds all GameObjects in the Scene which have a Component of the specified type.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> FindGameObjects<T>()
where T : class

Type Parameters

T

Return Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
FindGameObjects Overload
Duality.Resources Namespace


Scene.FindGameObjects Method (String)

SceneFindGameObjects Method (String)
Finds all GameObjects in the Scene that match the specified name or name path.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> FindGameObjects(
    string name
)

Parameters

name
Type: SystemString

Return Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
FindGameObjects Overload
Duality.Resources Namespace


Scene.FindGameObjects Method (Type)

SceneFindGameObjects Method (Type)
Finds all GameObjects in the Scene which have a Component of the specified type.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> FindGameObjects(
    Type hasComponentOfType
)

Parameters

hasComponentOfType
Type: SystemType

Return Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
FindGameObjects Overload
Duality.Resources Namespace


Scene.OnDisposing Method

SceneOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.OnLoaded Method

SceneOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.OnSaved Method

SceneOnSaved Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSaved(
    string saveAsPath
)

Parameters

saveAsPath
Type: SystemString
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.OnSaving Method

SceneOnSaving Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnSaving(
    string saveAsPath
)

Parameters

saveAsPath
Type: SystemString
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Reload Method

SceneReload Method
Reloads the current Scene or schedules it for reload at the end of the frame, depending on whether it is considered safe to do so immediately. Similar to SwitchTo(ContentRefScene, Boolean) with regard to execution planning.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void Reload()
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.RemoveObject Method

SceneRemoveObject Method
Overload List
 | Name | Description
Public method | RemoveObject(GameObject) | Unregisters a GameObject and all of its children
Public method | RemoveObject(IEnumerableGameObject) | Unregisters a set of GameObjects and all of their children.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.RemoveObject Method (GameObject)

SceneRemoveObject Method (GameObject)
Unregisters a GameObject and all of its children

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveObject(
    GameObject obj
)

Parameters

obj
Type: DualityGameObject
See Also

Reference

Scene Class
RemoveObject Overload
Duality.Resources Namespace


Scene.RemoveObject Method (IEnumerable(GameObject))

SceneRemoveObject Method (IEnumerableGameObject)
Unregisters a set of GameObjects and all of their children.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveObject(
    IEnumerable<GameObject> objEnum
)

Parameters

objEnum
Type: System.Collections.GenericIEnumerable GameObject
See Also

Reference

Scene Class
RemoveObject Overload
Duality.Resources Namespace


Scene.SwitchTo Method

SceneSwitchTo Method
Switches to the specified Scene, which will become the new current one. By default, this method does not guarantee to perform the Scene switch immediately, but may defer the switch to the end of the current update cycle.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void SwitchTo(
    ContentRef<Scene> scene,
    bool forceImmediately = false
)

Parameters

scene
Type: DualityContentRef Scene
The Scene to switch to.
forceImmediately (Optional)
Type: SystemBoolean
If true, an immediate switch is forced. Use only when necessary.
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene Properties

Scene Properties

The Scene type exposes the following members.

Properties
 | Name | Description
Public property | ActiveObjects | [GET] Enumerates all registered objects that are currently active.
Public property | ActiveRootObjects | [GET] Enumerates all RootObjects that are currently active.
Public property | AllObjects | [GET] Enumerates all registered objects.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Current | [GET / SET] The Scene that is currently active i.e. updated and rendered. This is never null. You may assign null in order to leave the current Scene and enter en empty dummy Scene.
 | CurrentPath | [GET] The Resource file path of the current Scene.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | GlobalGravity | [GET / SET] Global gravity force that is applied to all objects that obey the laws of physics.
Public property | IsCurrent | [GET] Returns whether this Scene is Current.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsEmpty | [GET] Returns whether this Scene is completely empty.
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | IsSwitching | [GET] Returns whether Current is in a transition between two different states, i.e. whether the current Scene is being changed right now.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | PhysicsAlpha | [GET] When using fixed-timestep physics, the alpha value [0.0 - 1.0] indicates how complete the next step is. This is used for linear interpolation inbetween fixed physics steps.
 | PhysicsFixedTime | [GET] Is fixed-timestep physics calculation currently active?
 | PhysicsWorld | [GET] Returns the current physics world.
Public property | RootObjects | [GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.
Public property | VisibilityStrategy | [GET / SET] The strategy that is used to determine which renderers are visible.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.ActiveObjects Property

SceneActiveObjects Property
[GET] Enumerates all registered objects that are currently active.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> ActiveObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.ActiveRootObjects Property

SceneActiveRootObjects Property
[GET] Enumerates all RootObjects that are currently active.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> ActiveRootObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.AllObjects Property

SceneAllObjects Property
[GET] Enumerates all registered objects.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> AllObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Current Property

SceneCurrent Property
[GET / SET] The Scene that is currently active i.e. updated and rendered. This is never null. You may assign null in order to leave the current Scene and enter en empty dummy Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Scene Current { get; }

Property Value

Type: Scene
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.CurrentPath Property

SceneCurrentPath Property
[GET] The Resource file path of the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static string CurrentPath { get; }

Property Value

Type: String
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.GlobalGravity Property

SceneGlobalGravity Property
[GET / SET] Global gravity force that is applied to all objects that obey the laws of physics.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 GlobalGravity { get; set; }

Property Value

Type: Vector2
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.IsCurrent Property

SceneIsCurrent Property
[GET] Returns whether this Scene is Current.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsCurrent { get; }

Property Value

Type: Boolean
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.IsEmpty Property

SceneIsEmpty Property
[GET] Returns whether this Scene is completely empty.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsEmpty { get; }

Property Value

Type: Boolean
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.IsSwitching Property

SceneIsSwitching Property
[GET] Returns whether Current is in a transition between two different states, i.e. whether the current Scene is being changed right now.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsSwitching { get; }

Property Value

Type: Boolean
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.PhysicsAlpha Property

ScenePhysicsAlpha Property
[GET] When using fixed-timestep physics, the alpha value [0.0 - 1.0] indicates how complete the next step is. This is used for linear interpolation inbetween fixed physics steps.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static float PhysicsAlpha { get; }

Property Value

Type: Single
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.PhysicsFixedTime Property

ScenePhysicsFixedTime Property
[GET] Is fixed-timestep physics calculation currently active?

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool PhysicsFixedTime { get; }

Property Value

Type: Boolean
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.PhysicsWorld Property

ScenePhysicsWorld Property
[GET] Returns the current physics world.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static World PhysicsWorld { get; }

Property Value

Type: World
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.RootObjects Property

SceneRootObjects Property
[GET] Enumerates all root GameObjects, i.e. all GameObjects without a parent object.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<GameObject> RootObjects { get; }

Property Value

Type: IEnumerable GameObject
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.VisibilityStrategy Property

SceneVisibilityStrategy Property
[GET / SET] The strategy that is used to determine which renderers are visible.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IRendererVisibilityStrategy VisibilityStrategy { get; set; }

Property Value

Type: IRendererVisibilityStrategy
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene Events

Scene Events

The Scene type exposes the following members.

Events
Name | Description
ComponentAdded | Fired when a Component has been added to a GameObject that is registered in the current Scene.
ComponentRemoving | Fired when a Component has been removed from a GameObject that is registered in the current Scene.
Entered | Fired right after entering the (now) current Scene.
GameObjectAdded | Fired when a GameObject has been registered in the current Scene.
GameObjectParentChanged | Fired when a GameObjects parent object has been changed in the current Scene.
GameObjectRemoved | Fired when a GameObject has been unregistered from the current Scene.
Leaving | Fired just before leaving the current Scene.
Top
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.ComponentAdded Event

SceneComponentAdded Event
Fired when a Component has been added to a GameObject that is registered in the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ComponentEventArgs> ComponentAdded

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.ComponentRemoving Event

SceneComponentRemoving Event
Fired when a Component has been removed from a GameObject that is registered in the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<ComponentEventArgs> ComponentRemoving

Value

Type: SystemEventHandler ComponentEventArgs
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Entered Event

SceneEntered Event
Fired right after entering the (now) current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler Entered

Value

Type: SystemEventHandler
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.GameObjectAdded Event

SceneGameObjectAdded Event
Fired when a GameObject has been registered in the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<GameObjectEventArgs> GameObjectAdded

Value

Type: SystemEventHandler GameObjectEventArgs
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.GameObjectParentChanged Event

SceneGameObjectParentChanged Event
Fired when a GameObjects parent object has been changed in the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<GameObjectParentChangedEventArgs> GameObjectParentChanged

Value

Type: SystemEventHandler GameObjectParentChangedEventArgs
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.GameObjectRemoved Event

SceneGameObjectRemoved Event
Fired when a GameObject has been unregistered from the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler<GameObjectEventArgs> GameObjectRemoved

Value

Type: SystemEventHandler GameObjectEventArgs
See Also

Reference

Scene Class
Duality.Resources Namespace


Scene.Leaving Event

SceneLeaving Event
Fired just before leaving the current Scene.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static event EventHandler Leaving

Value

Type: SystemEventHandler
See Also

Reference

Scene Class
Duality.Resources Namespace


ShaderFieldInfo Structure

ShaderFieldInfo Structure
Provides information about a shader variable.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct ShaderFieldInfo

The ShaderFieldInfo type exposes the following members.

Constructors
 | Name | Description
Public method | ShaderFieldInfo | Initializes a new instance of the ShaderFieldInfo class
Top
Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Fields
Name | Description
DefaultNameMainTex | The default variable name for a materials main texture.
Top
Properties
 | Name | Description
Public property | ArrayLength | [GET] If the variable is an array, this is its length. Arrays are only supported for Int and Float.
Public property | IsPrivate | [GET] Returns whether the shader variable should be considered private.
Public property | Name | [GET] The name of the variable, as declared in the shader.
Public property | Scope | [GET] The scope of the variable
Public property | Type | [GET] The type of the variable
Top
See Also

Reference

Duality.Resources Namespace


ShaderFieldInfo Constructor

ShaderFieldInfo Constructor
Initializes a new instance of the ShaderFieldInfo class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderFieldInfo(
    string name,
    ShaderFieldType type,
    ShaderFieldScope scope,
    int arrayLength = 1
)

Parameters

name
Type: SystemString
type
Type: Duality.ResourcesShaderFieldType
scope
Type: Duality.ResourcesShaderFieldScope
arrayLength (Optional)
Type: SystemInt32
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo Fields

ShaderFieldInfo Fields

The ShaderFieldInfo type exposes the following members.

Fields
Name | Description
DefaultNameMainTex | The default variable name for a materials main texture.
Top
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.DefaultNameMainTex Field

ShaderFieldInfoDefaultNameMainTex Field
The default variable name for a materials main texture.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public const string DefaultNameMainTex

Field Value

Type: String
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo Methods

ShaderFieldInfo Methods

The ShaderFieldInfo type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.ToString Method

ShaderFieldInfoToString Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo Properties

ShaderFieldInfo Properties

The ShaderFieldInfo type exposes the following members.

Properties
 | Name | Description
Public property | ArrayLength | [GET] If the variable is an array, this is its length. Arrays are only supported for Int and Float.
Public property | IsPrivate | [GET] Returns whether the shader variable should be considered private.
Public property | Name | [GET] The name of the variable, as declared in the shader.
Public property | Scope | [GET] The scope of the variable
Public property | Type | [GET] The type of the variable
Top
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.ArrayLength Property

ShaderFieldInfoArrayLength Property
[GET] If the variable is an array, this is its length. Arrays are only supported for Int and Float.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int ArrayLength { get; }

Property Value

Type: Int32
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.IsPrivate Property

ShaderFieldInfoIsPrivate Property
[GET] Returns whether the shader variable should be considered private.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPrivate { get; }

Property Value

Type: Boolean
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.Name Property

ShaderFieldInfoName Property
[GET] The name of the variable, as declared in the shader.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.Scope Property

ShaderFieldInfoScope Property
[GET] The scope of the variable

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderFieldScope Scope { get; }

Property Value

Type: ShaderFieldScope
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldInfo.Type Property

ShaderFieldInfoType Property
[GET] The type of the variable

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderFieldType Type { get; }

Property Value

Type: ShaderFieldType
See Also

Reference

ShaderFieldInfo Structure
Duality.Resources Namespace


ShaderFieldScope Enumeration

ShaderFieldScope Enumeration
The scope of a shader variable

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ShaderFieldScope
Members
Member name | Value | Description
Unknown | -1 | Unknown scope
Uniform | 0 | It is a uniform variable, i.e. constant during all rendering stages and set once per draw batch.
Attribute | 1 | It is a vertex attribute, i.e. defined for each vertex separately.
See Also

Reference

Duality.Resources Namespace


ShaderFieldType Enumeration

ShaderFieldType Enumeration
The type of a shader variable.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ShaderFieldType
Members
Member name | Value | Description
Unknown | -1 | Unknown type.
Bool | 0 | A Boolean variable.
Int | 1 | A Int32 variable.
Float | 2 | A Single variable.
Vec2 | 3 | A two-dimensional vector with Single precision.
Vec3 | 4 | A three-dimensional vector with Single precision.
Vec4 | 5 | A four-dimensional vector with Single precision.
Mat2 | 6 | A 2x2 matrix with Single precision.
Mat3 | 7 | A 3x3 matrix with Single precision.
Mat4 | 8 | A 4x4 matrix with Single precision.
Sampler2D | 9 | Represents a texture binding and provides lookups.
See Also

Reference

Duality.Resources Namespace


ShaderProgram Class

ShaderProgram Class
Represents an OpenGL ShaderProgram which consists of a Vertex- and a FragmentShader
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesShaderProgram

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ShaderProgram : Resource

The ShaderProgram type exposes the following members.

Constructors
 | Name | Description
Public method | ShaderProgram | Creates a new, empty ShaderProgram.
Public method | ShaderProgram(ContentRefVertexShader, ContentRefFragmentShader) | Creates a new ShaderProgram based on a Vertex- and a FragmentShader.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the ShaderProgram. This is done automatically when loading the ShaderProgram or when binding it.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Returns whether this ShaderProgram has been compiled.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | Fields | [GET] Returns an array containing information about the variables that have been declared in shader source code.
Public property | Fragment | [GET / SET] The FragmentShader that is used by this ShaderProgram.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | A minimal ShaderProgram, using a Minimal VertexShader and a Minimal FragmentShader.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | A ShaderProgram designed for picking operations. It uses a Minimal VertexShader and a Picking FragmentShader.
 | SharpAlpha | The SharpMask ShaderProgram, using a Minimal VertexShader and a SharpAlpha FragmentShader.
 | SmoothAnim | The SmoothAnim ShaderProgram, using a SmoothAnim VertexShader and a SmoothAnim FragmentShader. Some Renderers might react automatically to Materials using this ShaderProgram and provide a suitable vertex format.
Public property | Vertex | [GET / SET] The VertexShader that is used by this ShaderProgram.
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesAbstractShader
Duality.ResourcesVertexShader
Duality.ResourcesFragmentShader


ShaderProgram Constructor

ShaderProgram Constructor
Overload List
 | Name | Description
Public method | ShaderProgram | Creates a new, empty ShaderProgram.
Public method | ShaderProgram(ContentRefVertexShader, ContentRefFragmentShader) | Creates a new ShaderProgram based on a Vertex- and a FragmentShader.
Top
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram Constructor

ShaderProgram Constructor
Creates a new, empty ShaderProgram.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderProgram()
See Also

Reference

ShaderProgram Class
ShaderProgram Overload
Duality.Resources Namespace


ShaderProgram Constructor (ContentRef(VertexShader), ContentRef(FragmentShader))

ShaderProgram Constructor (ContentRefVertexShader, ContentRefFragmentShader)
Creates a new ShaderProgram based on a Vertex- and a FragmentShader.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderProgram(
    ContentRef<VertexShader> v,
    ContentRef<FragmentShader> f
)

Parameters

v
Type: DualityContentRef VertexShader
f
Type: DualityContentRef FragmentShader
See Also

Reference

ShaderProgram Class
ShaderProgram Overload
Duality.Resources Namespace


ShaderProgram Fields

ShaderProgram Fields

The ShaderProgram type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram Methods

ShaderProgram Methods

The ShaderProgram type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the ShaderProgram. This is done automatically when loading the ShaderProgram or when binding it.
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Compile Method

ShaderProgramCompile Method
Compiles the ShaderProgram. This is done automatically when loading the ShaderProgram or when binding it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Compile()
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.OnCopyDataTo Method

ShaderProgramOnCopyDataTo Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.OnDisposing Method

ShaderProgramOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.OnLoaded Method

ShaderProgramOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram Properties

ShaderProgram Properties

The ShaderProgram type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Returns whether this ShaderProgram has been compiled.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | Fields | [GET] Returns an array containing information about the variables that have been declared in shader source code.
Public property | Fragment | [GET / SET] The FragmentShader that is used by this ShaderProgram.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | A minimal ShaderProgram, using a Minimal VertexShader and a Minimal FragmentShader.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | Picking | A ShaderProgram designed for picking operations. It uses a Minimal VertexShader and a Picking FragmentShader.
 | SharpAlpha | The SharpMask ShaderProgram, using a Minimal VertexShader and a SharpAlpha FragmentShader.
 | SmoothAnim | The SmoothAnim ShaderProgram, using a SmoothAnim VertexShader and a SmoothAnim FragmentShader. Some Renderers might react automatically to Materials using this ShaderProgram and provide a suitable vertex format.
Public property | Vertex | [GET / SET] The VertexShader that is used by this ShaderProgram.
Top
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Compiled Property

ShaderProgramCompiled Property
[GET] Returns whether this ShaderProgram has been compiled.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Compiled { get; }

Property Value

Type: Boolean
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Fields Property

ShaderProgramFields Property
[GET] Returns an array containing information about the variables that have been declared in shader source code.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ShaderFieldInfo[] Fields { get; }

Property Value

Type: ShaderFieldInfo
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Fragment Property

ShaderProgramFragment Property
[GET / SET] The FragmentShader that is used by this ShaderProgram.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<FragmentShader> Fragment { get; set; }

Property Value

Type: ContentRef FragmentShader
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Minimal Property

ShaderProgramMinimal Property
A minimal ShaderProgram, using a Minimal VertexShader and a Minimal FragmentShader.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<ShaderProgram> Minimal { get; }

Property Value

Type: ContentRef ShaderProgram
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Native Property

ShaderProgramNative Property
[GET] The shaders native backend. Don't use this unless you know exactly what you're doing.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeShaderProgram Native { get; }

Property Value

Type: INativeShaderProgram
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Picking Property

ShaderProgramPicking Property
A ShaderProgram designed for picking operations. It uses a Minimal VertexShader and a Picking FragmentShader.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<ShaderProgram> Picking { get; }

Property Value

Type: ContentRef ShaderProgram
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.SharpAlpha Property

ShaderProgramSharpAlpha Property
The SharpMask ShaderProgram, using a Minimal VertexShader and a SharpAlpha FragmentShader.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<ShaderProgram> SharpAlpha { get; }

Property Value

Type: ContentRef ShaderProgram
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.SmoothAnim Property

ShaderProgramSmoothAnim Property
The SmoothAnim ShaderProgram, using a SmoothAnim VertexShader and a SmoothAnim FragmentShader. Some Renderers might react automatically to Materials using this ShaderProgram and provide a suitable vertex format.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<ShaderProgram> SmoothAnim { get; }

Property Value

Type: ContentRef ShaderProgram
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderProgram.Vertex Property

ShaderProgramVertex Property
[GET / SET] The VertexShader that is used by this ShaderProgram.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<VertexShader> Vertex { get; set; }

Property Value

Type: ContentRef VertexShader
See Also

Reference

ShaderProgram Class
Duality.Resources Namespace


ShaderType Enumeration

ShaderType Enumeration

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum ShaderType
Members
Member name | Value | Description
Vertex | 0 |
Fragment | 1 |
See Also

Reference

Duality.Resources Namespace


Sound Class

Sound Class
A Sound is parameterized AudioData. Note that a Sound Resource does not contain any kind of audio data by itsself.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesSound

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Sound : Resource

The Sound type exposes the following members.

Constructors
 | Name | Description
Public method | Sound | Creates a new, empty sound. Since it does not refer to any AudioData yet, it can't be played.
Public method | Sound(ContentRefAudioData) | Creates a new Sound referring to an existing AudioData.
Public method | Sound(IEnumerableContentRefAudioData) | Creates a new Sound referring to an existing set of AudioData.
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Public method | FetchData | Upon playing the Sound, this method is called once to determine which of the referenced AudioData objects is to be played.
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Beep | [GET] A simple beep Sound.
Public property | Data | [GET / SET] A collection of AudioData, which are used by this Sound.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FadeOutAt | [GET / SET] Play time in seconds at which SoundInstances of this Sound automatically fade out.
Public property | FadeOutTime | [GET / SET] If FadeOutAt has been triggered, this is the fade out time in seconds that is used.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | LowpassFactor | [GET / SET] A lowpass factor that is applied when playing this sound.
Public property | MainData | [GET / SET] The main source AudioData that is used by this Sound.
Public property | MaxDist | [GET / SET] The distance at which the sound is played at zero volume.
Public property | MaxDistFactor | [GET / SET] The distance at which the sound is played at zero volume. Note that the value is a factor to DefaultMaxDist.
Public property | MaxInstances | [GET / SET] Maximum number of SoundInstances of this Sound that can play simultaneously. If exceeded, any new instances of it are discarded.
Public property | MinDist | [GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore.
Public property | MinDistFactor | [GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore. Note that the value is a factor to DefaultMinDist.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PitchFactor | [GET / SET] A pitch factor that is applied when playing this sound.
Public property | Type | [GET / SET] The category to which this Sound belongs.
Public property | VolumeFactor | [GET / SET] A volume factor that is applied when playing this sound.
Top
Examples
While there may be one AudioData Resource sounding like an Explosion effect, there could be many Sounds referring to it, like a very loud or very quiet Explosion or one that is noticable on higher distance than others.
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesAudioData


Sound Constructor

Sound Constructor
Overload List
 | Name | Description
Public method | Sound | Creates a new, empty sound. Since it does not refer to any AudioData yet, it can't be played.
Public method | Sound(ContentRefAudioData) | Creates a new Sound referring to an existing AudioData.
Public method | Sound(IEnumerableContentRefAudioData) | Creates a new Sound referring to an existing set of AudioData.
Top
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound Constructor

Sound Constructor
Creates a new, empty sound. Since it does not refer to any AudioData yet, it can't be played.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Sound()
See Also

Reference

Sound Class
Sound Overload
Duality.Resources Namespace


Sound Constructor (ContentRef(AudioData))

Sound Constructor (ContentRefAudioData)
Creates a new Sound referring to an existing AudioData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Sound(
    ContentRef<AudioData> baseData
)

Parameters

baseData
Type: DualityContentRef AudioData
See Also

Reference

Sound Class
Sound Overload
Duality.Resources Namespace


Sound Constructor (IEnumerable(ContentRef(AudioData)))

Sound Constructor (IEnumerableContentRefAudioData)
Creates a new Sound referring to an existing set of AudioData.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Sound(
    IEnumerable<ContentRef<AudioData>> baseData
)

Parameters

baseData
Type: System.Collections.GenericIEnumerable ContentRef AudioData
See Also

Reference

Sound Class
Sound Overload
Duality.Resources Namespace


Sound Fields

Sound Fields

The Sound type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound Methods

Sound Methods

The Sound type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Public method | FetchData | Upon playing the Sound, this method is called once to determine which of the referenced AudioData objects is to be played.
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | This method performs the CopyTo(Resource) operation for custom Resource Types. It uses reflection to perform the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See CopyDataTo(Object, ICloneOperation) for a more thorough explanation. (Inherited from Resource.)
Protected method | OnDisposing | Called when beginning to dispose the Resource. (Inherited from Resource.)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.FetchData Method

SoundFetchData Method
Upon playing the Sound, this method is called once to determine which of the referenced AudioData objects is to be played.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<AudioData> FetchData()

Return Value

Type: ContentRef AudioData
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.OnLoaded Method

SoundOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound Properties

Sound Properties

The Sound type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
 | Beep | [GET] A simple beep Sound.
Public property | Data | [GET / SET] A collection of AudioData, which are used by this Sound.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FadeOutAt | [GET / SET] Play time in seconds at which SoundInstances of this Sound automatically fade out.
Public property | FadeOutTime | [GET / SET] If FadeOutAt has been triggered, this is the fade out time in seconds that is used.
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | LowpassFactor | [GET / SET] A lowpass factor that is applied when playing this sound.
Public property | MainData | [GET / SET] The main source AudioData that is used by this Sound.
Public property | MaxDist | [GET / SET] The distance at which the sound is played at zero volume.
Public property | MaxDistFactor | [GET / SET] The distance at which the sound is played at zero volume. Note that the value is a factor to DefaultMaxDist.
Public property | MaxInstances | [GET / SET] Maximum number of SoundInstances of this Sound that can play simultaneously. If exceeded, any new instances of it are discarded.
Public property | MinDist | [GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore.
Public property | MinDistFactor | [GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore. Note that the value is a factor to DefaultMinDist.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PitchFactor | [GET / SET] A pitch factor that is applied when playing this sound.
Public property | Type | [GET / SET] The category to which this Sound belongs.
Public property | VolumeFactor | [GET / SET] A volume factor that is applied when playing this sound.
Top
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.Beep Property

SoundBeep Property
[GET] A simple beep Sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Sound> Beep { get; }

Property Value

Type: ContentRef Sound
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.Data Property

SoundData Property
[GET / SET] A collection of AudioData, which are used by this Sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public List<ContentRef<AudioData>> Data { get; set; }

Property Value

Type: List ContentRef AudioData
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.FadeOutAt Property

SoundFadeOutAt Property
[GET / SET] Play time in seconds at which SoundInstances of this Sound automatically fade out.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FadeOutAt { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.FadeOutTime Property

SoundFadeOutTime Property
[GET / SET] If FadeOutAt has been triggered, this is the fade out time in seconds that is used.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float FadeOutTime { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.LowpassFactor Property

SoundLowpassFactor Property
[GET / SET] A lowpass factor that is applied when playing this sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float LowpassFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.MainData Property

SoundMainData Property
[GET / SET] The main source AudioData that is used by this Sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<AudioData> MainData { get; set; }

Property Value

Type: ContentRef AudioData
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.MaxDist Property

SoundMaxDist Property
[GET / SET] The distance at which the sound is played at zero volume.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxDist { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace
SoundMaxDistFactor


Sound.MaxDistFactor Property

SoundMaxDistFactor Property
[GET / SET] The distance at which the sound is played at zero volume. Note that the value is a factor to DefaultMaxDist.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MaxDistFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace
SoundMaxDist


Sound.MaxInstances Property

SoundMaxInstances Property
[GET / SET] Maximum number of SoundInstances of this Sound that can play simultaneously. If exceeded, any new instances of it are discarded.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int MaxInstances { get; set; }

Property Value

Type: Int32
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.MinDist Property

SoundMinDist Property
[GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinDist { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace
SoundMinDistFactor


Sound.MinDistFactor Property

SoundMinDistFactor Property
[GET / SET] The distance at which the sound is played at full volume. Getting nearer to the source won't increase the volume anymore. Note that the value is a factor to DefaultMinDist.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float MinDistFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace
SoundMinDist


Sound.PitchFactor Property

SoundPitchFactor Property
[GET / SET] A pitch factor that is applied when playing this sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float PitchFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.Type Property

SoundType Property
[GET / SET] The category to which this Sound belongs.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SoundType Type { get; set; }

Property Value

Type: SoundType
See Also

Reference

Sound Class
Duality.Resources Namespace


Sound.VolumeFactor Property

SoundVolumeFactor Property
[GET / SET] A volume factor that is applied when playing this sound.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public float VolumeFactor { get; set; }

Property Value

Type: Single
See Also

Reference

Sound Class
Duality.Resources Namespace


Texture Class

Texture Class
A Texture refers to pixel data stored in video memory
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesTexture

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class Texture : Resource

The Texture type exposes the following members.

Constructors
 | Name | Description
Public method | Texture | Sets up a new, uninitialized Texture.
Public method | Texture(ContentRefPixmap, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat) | Creates a new Texture based on a Pixmap.
Public method | Texture(Int32, Int32, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat) | Creates a new empty Texture with the specified size.
Top
Methods
 | Name | Description
Protected method | AdjustSize | Processes the specified size based on the Textures TextureSizeMode.
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetPixelData | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T) | Retrieves the pixel data that is currently stored in video memory.
Public method | LoadData(ContentRefPixmap) | Loads the specified Pixmaps pixel data.
Public method | LoadData(ContentRefPixmap, TextureSizeMode) | Loads the specified Pixmaps pixel data.
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) texture Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) texture Atlas lookup.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | ReloadData | Reloads this Textures pixel data. If the referred Pixmap has been modified, changes will now be visible.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Protected method | SetupNativeRes | Sets up the Textures OpenGL resources, clearing previously uploaded pixel data.
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AnisotropicFilter | [GET / SET] Specifies whether this texture uses anisotropic filtering.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | BasePixmap | [GET / SET] Reference to a Pixmap that contains the pixel data that is or has been uploaded to the Texture
 | Checkerboard | [GET] A 256x256 black and white checkerboard texture.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | [GET] A Texture showing the Duality icon.
 | DualityIconB | [GET] A Texture showing the Duality icon without the text on it.
 | DualityLogoBig | A Texture showing the Duality logo.
 | DualityLogoMedium | A Texture showing the Duality logo.
 | DualityLogoSmall | A Texture showing the Duality logo.
Public property | FilterMag | [GET / SET] The Textures magnifying filter
Public property | FilterMin | [GET / SET] The Textures minifying filter
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | HasMipmaps | [GET] Returns whether or not the texture uses mipmaps.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native texture. You shouldn't use this unless you know exactly what you're doing.
Public property | NeedsReload | Indicates that the textures parameters have been changed in a way that will make it necessary to reload its data before using it next time.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PixelFormat | [GET / SET] The Textures pixel format
Public property | PixelHeight | [GET] The Textures original pixel height
Public property | PixelWidth | [GET] The Textures original pixel width
Public property | Size | [GET / SET] The Textures size. Readonly, when created from a BasePixmap.
Public property | TexelHeight | [GET] The Textures internal texel height
Public property | TexelWidth | [GET] The Textures internal texel width
Public property | TexSizeMode | [GET / SET] Handles how the Textures base Pixmap is adjusted in order to fit GPU texture size requirements (Power of Two dimensions)
Public property | UVRatio | [GET] UV (Texture) coordinates for the Textures lower right
 | White | [GET] A plain white 1x1 Texture. Can be used as a dummy.
Public property | WrapX | [GET / SET] The Textures horizontal wrap mode
Public property | WrapY | [GET / SET] The Textures vertical wrap mode
Top
See Also

Reference

Duality.Resources Namespace
Duality.ResourcesPixmap
Duality.ResourcesRenderTarget


Texture Constructor

Texture Constructor
Overload List
 | Name | Description
Public method | Texture | Sets up a new, uninitialized Texture.
Public method | Texture(ContentRefPixmap, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat) | Creates a new Texture based on a Pixmap.
Public method | Texture(Int32, Int32, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat) | Creates a new empty Texture with the specified size.
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture Constructor

Texture Constructor
Sets up a new, uninitialized Texture.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Texture()
See Also

Reference

Texture Class
Texture Overload
Duality.Resources Namespace


Texture Constructor (ContentRef(Pixmap), TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat)

Texture Constructor (ContentRefPixmap, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat)
Creates a new Texture based on a Pixmap.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Texture(
    ContentRef<Pixmap> basePixmap,
    TextureSizeMode sizeMode = TextureSizeMode.Enlarge,
    TextureMagFilter filterMag = TextureMagFilter.Linear,
    TextureMinFilter filterMin = TextureMinFilter.LinearMipmapLinear,
    TextureWrapMode wrapX = TextureWrapMode.Clamp,
    TextureWrapMode wrapY = TextureWrapMode.Clamp,
    TexturePixelFormat format = TexturePixelFormat.Rgba
)

Parameters

basePixmap
Type: DualityContentRef Pixmap
The Pixmap to use as source for pixel data.
sizeMode (Optional)
Type: Duality.DrawingTextureSizeMode
Specifies behaviour in case the source data has non-power-of-two dimensions.
filterMag (Optional)
Type: Duality.DrawingTextureMagFilter
The OpenGL filter mode for drawing the Texture bigger than it is.
filterMin (Optional)
Type: Duality.DrawingTextureMinFilter
The OpenGL fitler mode for drawing the Texture smaller than it is.
wrapX (Optional)
Type: Duality.DrawingTextureWrapMode
The OpenGL wrap mode on the texel x axis.
wrapY (Optional)
Type: Duality.DrawingTextureWrapMode
The OpenGL wrap mode on the texel y axis.
format (Optional)
Type: Duality.DrawingTexturePixelFormat
The format in which OpenGL stores the pixel data.
See Also

Reference

Texture Class
Texture Overload
Duality.Resources Namespace


Texture Constructor (Int32, Int32, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat)

Texture Constructor (Int32, Int32, TextureSizeMode, TextureMagFilter, TextureMinFilter, TextureWrapMode, TextureWrapMode, TexturePixelFormat)
Creates a new empty Texture with the specified size.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Texture(
    int width,
    int height,
    TextureSizeMode sizeMode = TextureSizeMode.Enlarge,
    TextureMagFilter filterMag = TextureMagFilter.Linear,
    TextureMinFilter filterMin = TextureMinFilter.LinearMipmapLinear,
    TextureWrapMode wrapX = TextureWrapMode.Clamp,
    TextureWrapMode wrapY = TextureWrapMode.Clamp,
    TexturePixelFormat format = TexturePixelFormat.Rgba
)

Parameters

width
Type: SystemInt32
The Textures width.
height
Type: SystemInt32
The Textures height
sizeMode (Optional)
Type: Duality.DrawingTextureSizeMode
Specifies behaviour in case the specified size has non-power-of-two dimensions.
filterMag (Optional)
Type: Duality.DrawingTextureMagFilter
The OpenGL filter mode for drawing the Texture bigger than it is.
filterMin (Optional)
Type: Duality.DrawingTextureMinFilter
The OpenGL fitler mode for drawing the Texture smaller than it is.
wrapX (Optional)
Type: Duality.DrawingTextureWrapMode
The OpenGL wrap mode on the texel x axis.
wrapY (Optional)
Type: Duality.DrawingTextureWrapMode
The OpenGL wrap mode on the texel y axis.
format (Optional)
Type: Duality.DrawingTexturePixelFormat
The format in which OpenGL stores the pixel data.
See Also

Reference

Texture Class
Texture Overload
Duality.Resources Namespace


Texture Fields

Texture Fields

The Texture type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture Methods

Texture Methods

The Texture type exposes the following members.

Methods
 | Name | Description
Protected method | AdjustSize | Processes the specified size based on the Textures TextureSizeMode.
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Public method | GetPixelData | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T) | Retrieves the pixel data that is currently stored in video memory.
Public method | LoadData(ContentRefPixmap) | Loads the specified Pixmaps pixel data.
Public method | LoadData(ContentRefPixmap, TextureSizeMode) | Loads the specified Pixmaps pixel data.
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) texture Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) texture Atlas lookup.
Protected method | OnCopyDataTo | (Overrides ResourceOnCopyDataTo(Object, ICloneOperation).)
Protected method | OnDisposing | (Overrides ResourceOnDisposing(Boolean).)
Protected method | OnLoaded | (Overrides ResourceOnLoaded.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | ReloadData | Reloads this Textures pixel data. If the referred Pixmap has been modified, changes will now be visible.
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Protected method | SetupNativeRes | Sets up the Textures OpenGL resources, clearing previously uploaded pixel data.
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.AdjustSize Method

TextureAdjustSize Method
Processes the specified size based on the Textures TextureSizeMode.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void AdjustSize(
    float width,
    float height
)

Parameters

width
Type: SystemSingle
height
Type: SystemSingle
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.GetPixelData Method

TextureGetPixelData Method
Overload List
 | Name | Description
Public method | GetPixelData | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelDataT(T) | Retrieves the pixel data that is currently stored in video memory.
Public method | GetPixelData(PixelData) | Retrieves the pixel data that is currently stored in video memory.
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.GetPixelData Method

TextureGetPixelData Method
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public PixelData GetPixelData()

Return Value

Type: PixelData
See Also

Reference

Texture Class
GetPixelData Overload
Duality.Resources Namespace


Texture.GetPixelData(T) Method (T[])

TextureGetPixelDataT Method (T)
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int GetPixelData<T>(
    T[] targetBuffer
)
where T : struct, new()

Parameters

targetBuffer
Type: T
The buffer (Rgba8 format) to store all the pixel data in. Its byte length should be at least TexelWidth * TexelHeight * 4.

Type Parameters

T

Return Value

Type: Int32
The number of bytes that were read.
See Also

Reference

Texture Class
GetPixelData Overload
Duality.Resources Namespace


Texture.GetPixelData Method (PixelData)

TextureGetPixelData Method (PixelData)
Retrieves the pixel data that is currently stored in video memory.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void GetPixelData(
    PixelData target
)

Parameters

target
Type: Duality.DrawingPixelData
The target image to store the retrieved pixel data in.
See Also

Reference

Texture Class
GetPixelData Overload
Duality.Resources Namespace


Texture.LoadData Method

TextureLoadData Method
Overload List
 | Name | Description
Public method | LoadData(ContentRefPixmap) | Loads the specified Pixmaps pixel data.
Public method | LoadData(ContentRefPixmap, TextureSizeMode) | Loads the specified Pixmaps pixel data.
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.LoadData Method (ContentRef(Pixmap))

TextureLoadData Method (ContentRefPixmap)
Loads the specified Pixmaps pixel data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LoadData(
    ContentRef<Pixmap> basePixmap
)

Parameters

basePixmap
Type: DualityContentRef Pixmap
The Pixmap that is used as pixel data source.
See Also

Reference

Texture Class
LoadData Overload
Duality.Resources Namespace


Texture.LoadData Method (ContentRef(Pixmap), TextureSizeMode)

TextureLoadData Method (ContentRefPixmap, TextureSizeMode)
Loads the specified Pixmaps pixel data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LoadData(
    ContentRef<Pixmap> basePixmap,
    TextureSizeMode sizeMode
)

Parameters

basePixmap
Type: DualityContentRef Pixmap
The Pixmap that is used as pixel data source.
sizeMode
Type: Duality.DrawingTextureSizeMode
Specifies behaviour in case the source data has non-power-of-two dimensions.
See Also

Reference

Texture Class
LoadData Overload
Duality.Resources Namespace


Texture.LookupAtlas Method

TextureLookupAtlas Method
Overload List
 | Name | Description
Public method | LookupAtlas(Int32) | Does a safe (null-checked, clamped) texture Atlas lookup.
Public method | LookupAtlas(Int32, Rect) | Does a safe (null-checked, clamped) texture Atlas lookup.
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.LookupAtlas Method (Int32)

TextureLookupAtlas Method (Int32)
Does a safe (null-checked, clamped) texture Atlas lookup.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Rect LookupAtlas(
    int index
)

Parameters

index
Type: SystemInt32

Return Value

Type: Rect
See Also

Reference

Texture Class
LookupAtlas Overload
Duality.Resources Namespace


Texture.LookupAtlas Method (Int32, Rect)

TextureLookupAtlas Method (Int32, Rect)
Does a safe (null-checked, clamped) texture Atlas lookup.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void LookupAtlas(
    int index,
    out Rect uv
)

Parameters

index
Type: SystemInt32
uv
Type: DualityRect
See Also

Reference

Texture Class
LookupAtlas Overload
Duality.Resources Namespace


Texture.OnCopyDataTo Method

TextureOnCopyDataTo Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnCopyDataTo(
    Object target,
    ICloneOperation operation
)

Parameters

target
Type: SystemObject
operation
Type: Duality.CloningICloneOperation
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.OnDisposing Method

TextureOnDisposing Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnDisposing(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.OnLoaded Method

TextureOnLoaded Method

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnLoaded()
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.ReloadData Method

TextureReloadData Method
Reloads this Textures pixel data. If the referred Pixmap has been modified, changes will now be visible.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ReloadData()
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.SetupNativeRes Method

TextureSetupNativeRes Method
Sets up the Textures OpenGL resources, clearing previously uploaded pixel data.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void SetupNativeRes()
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture Properties

Texture Properties

The Texture type exposes the following members.

Properties
 | Name | Description
Public property | AnisotropicFilter | [GET / SET] Specifies whether this texture uses anisotropic filtering.
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | BasePixmap | [GET / SET] Reference to a Pixmap that contains the pixel data that is or has been uploaded to the Texture
 | Checkerboard | [GET] A 256x256 black and white checkerboard texture.
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
 | DualityIcon | [GET] A Texture showing the Duality icon.
 | DualityIconB | [GET] A Texture showing the Duality icon without the text on it.
 | DualityLogoBig | A Texture showing the Duality logo.
 | DualityLogoMedium | A Texture showing the Duality logo.
 | DualityLogoSmall | A Texture showing the Duality logo.
Public property | FilterMag | [GET / SET] The Textures magnifying filter
Public property | FilterMin | [GET / SET] The Textures minifying filter
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | HasMipmaps | [GET] Returns whether or not the texture uses mipmaps.
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The backends native texture. You shouldn't use this unless you know exactly what you're doing.
Public property | NeedsReload | Indicates that the textures parameters have been changed in a way that will make it necessary to reload its data before using it next time.
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
Public property | PixelFormat | [GET / SET] The Textures pixel format
Public property | PixelHeight | [GET] The Textures original pixel height
Public property | PixelWidth | [GET] The Textures original pixel width
Public property | Size | [GET / SET] The Textures size. Readonly, when created from a BasePixmap.
Public property | TexelHeight | [GET] The Textures internal texel height
Public property | TexelWidth | [GET] The Textures internal texel width
Public property | TexSizeMode | [GET / SET] Handles how the Textures base Pixmap is adjusted in order to fit GPU texture size requirements (Power of Two dimensions)
Public property | UVRatio | [GET] UV (Texture) coordinates for the Textures lower right
 | White | [GET] A plain white 1x1 Texture. Can be used as a dummy.
Public property | WrapX | [GET / SET] The Textures horizontal wrap mode
Public property | WrapY | [GET / SET] The Textures vertical wrap mode
Top
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.AnisotropicFilter Property

TextureAnisotropicFilter Property
[GET / SET] Specifies whether this texture uses anisotropic filtering.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AnisotropicFilter { get; set; }

Property Value

Type: Boolean
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.BasePixmap Property

TextureBasePixmap Property
[GET / SET] Reference to a Pixmap that contains the pixel data that is or has been uploaded to the Texture

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ContentRef<Pixmap> BasePixmap { get; set; }

Property Value

Type: ContentRef Pixmap
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.Checkerboard Property

TextureCheckerboard Property
[GET] A 256x256 black and white checkerboard texture.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> Checkerboard { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.DualityIcon Property

TextureDualityIcon Property
[GET] A Texture showing the Duality icon.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> DualityIcon { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.DualityIconB Property

TextureDualityIconB Property
[GET] A Texture showing the Duality icon without the text on it.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> DualityIconB { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.DualityLogoBig Property

TextureDualityLogoBig Property
A Texture showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> DualityLogoBig { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.DualityLogoMedium Property

TextureDualityLogoMedium Property
A Texture showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> DualityLogoMedium { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.DualityLogoSmall Property

TextureDualityLogoSmall Property
A Texture showing the Duality logo.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> DualityLogoSmall { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.FilterMag Property

TextureFilterMag Property
[GET / SET] The Textures magnifying filter

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextureMagFilter FilterMag { get; set; }

Property Value

Type: TextureMagFilter
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.FilterMin Property

TextureFilterMin Property
[GET / SET] The Textures minifying filter

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextureMinFilter FilterMin { get; set; }

Property Value

Type: TextureMinFilter
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.HasMipmaps Property

TextureHasMipmaps Property
[GET] Returns whether or not the texture uses mipmaps.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool HasMipmaps { get; }

Property Value

Type: Boolean
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.Native Property

TextureNative Property
[GET] The backends native texture. You shouldn't use this unless you know exactly what you're doing.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public INativeTexture Native { get; }

Property Value

Type: INativeTexture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.NeedsReload Property

TextureNeedsReload Property
Indicates that the textures parameters have been changed in a way that will make it necessary to reload its data before using it next time.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool NeedsReload { get; }

Property Value

Type: Boolean
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.PixelFormat Property

TexturePixelFormat Property
[GET / SET] The Textures pixel format

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TexturePixelFormat PixelFormat { get; set; }

Property Value

Type: TexturePixelFormat
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.PixelHeight Property

TexturePixelHeight Property
[GET] The Textures original pixel height

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int PixelHeight { get; }

Property Value

Type: Int32
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.PixelWidth Property

TexturePixelWidth Property
[GET] The Textures original pixel width

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int PixelWidth { get; }

Property Value

Type: Int32
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.Size Property

TextureSize Property
[GET / SET] The Textures size. Readonly, when created from a BasePixmap.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 Size { get; set; }

Property Value

Type: Vector2
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.TexelHeight Property

TextureTexelHeight Property
[GET] The Textures internal texel height

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int TexelHeight { get; }

Property Value

Type: Int32
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.TexelWidth Property

TextureTexelWidth Property
[GET] The Textures internal texel width

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public int TexelWidth { get; }

Property Value

Type: Int32
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.TexSizeMode Property

TextureTexSizeMode Property
[GET / SET] Handles how the Textures base Pixmap is adjusted in order to fit GPU texture size requirements (Power of Two dimensions)

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextureSizeMode TexSizeMode { get; set; }

Property Value

Type: TextureSizeMode
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.UVRatio Property

TextureUVRatio Property
[GET] UV (Texture) coordinates for the Textures lower right

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Vector2 UVRatio { get; }

Property Value

Type: Vector2
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.White Property

TextureWhite Property
[GET] A plain white 1x1 Texture. Can be used as a dummy.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<Texture> White { get; }

Property Value

Type: ContentRef Texture
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.WrapX Property

TextureWrapX Property
[GET / SET] The Textures horizontal wrap mode

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextureWrapMode WrapX { get; set; }

Property Value

Type: TextureWrapMode
See Also

Reference

Texture Class
Duality.Resources Namespace


Texture.WrapY Property

TextureWrapY Property
[GET / SET] The Textures vertical wrap mode

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TextureWrapMode WrapY { get; set; }

Property Value

Type: TextureWrapMode
See Also

Reference

Texture Class
Duality.Resources Namespace


VertexShader Class

VertexShader Class
Represents an OpenGL VertexShader.
Inheritance Hierarchy
SystemObject
DualityResource
Duality.ResourcesAbstractShader
Duality.ResourcesVertexShader

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class VertexShader : AbstractShader

The VertexShader type exposes the following members.

Constructors
 | Name | Description
Public method | VertexShader | Initializes a new instance of the VertexShader class
Public method | VertexShader(String) | Initializes a new instance of the VertexShader class
Top
Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram. (Inherited from AbstractShader.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Inherited from AbstractShader.)
Protected method | OnDisposing | (Inherited from AbstractShader.)
Protected method | OnLoaded | (Inherited from AbstractShader.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not. (Inherited from AbstractShader.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | [GET] A minimal VertexShader. It performs OpenGLs default transformation and forwards a single texture coordinate and color to the fragment stage.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing. (Inherited from AbstractShader.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | SmoothAnim | [GET] The SmoothAnim VertexShader. In addition to the Minimal setup, it forwards the custom animBlend vertex attribute to the fragment stage.
Public property | Source | [GET] The shaders source code. (Inherited from AbstractShader.)
Protected property | Type | (Overrides AbstractShaderType.)
Top
See Also

Reference

Duality.Resources Namespace


VertexShader Constructor

VertexShader Constructor
Overload List
 | Name | Description
Public method | VertexShader | Initializes a new instance of the VertexShader class
Public method | VertexShader(String) | Initializes a new instance of the VertexShader class
Top
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader Constructor

VertexShader Constructor
Initializes a new instance of the VertexShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexShader()
See Also

Reference

VertexShader Class
VertexShader Overload
Duality.Resources Namespace


VertexShader Constructor (String)

VertexShader Constructor (String)
Initializes a new instance of the VertexShader class

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public VertexShader(
    string sourceCode
)

Parameters

sourceCode
Type: SystemString
See Also

Reference

VertexShader Class
VertexShader Overload
Duality.Resources Namespace


VertexShader Fields

VertexShader Fields

The VertexShader type exposes the following members.

Fields
 | Name | Description
Protected field | assetInfo | Contains information on how this Resource should be treated during Asset import operations in the editor. (Inherited from Resource.)
Protected field | path | The path of this Resource. (Inherited from Resource.)
Top
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader Methods

VertexShader Methods

The VertexShader type exposes the following members.

Methods
 | Name | Description
Public method | Clone | Creates a deep copy of this Resource. (Inherited from Resource.)
Public method | Compile | Compiles the shader. This is done automatically when loading the shader or attaching it to a ShaderProgram. (Inherited from AbstractShader.)
Public method | CopyTo | Deep-copies this Resource to the specified target Resource. The target Resource's Type must match this Resource's Type. (Inherited from Resource.)
Public method | Dispose | Disposes the Resource. Please don't do something silly, like disposing a Scene while it is updated.. use DisposeLater(IManageableObject) instead! (Inherited from Resource.)
Protected method | Finalize | (Inherited from Resource.)
Public method | GetContentRef | Creates a ContentRefT referring to this Resource. (Inherited from Resource.)
Protected method | OnCopyDataTo | (Inherited from AbstractShader.)
Protected method | OnDisposing | (Inherited from AbstractShader.)
Protected method | OnLoaded | (Inherited from AbstractShader.)
Protected method | OnSaved | Called when this Resource has just been saved. (Inherited from Resource.)
Protected method | OnSaving | Called when this Resource is now beginning to be saved. (Inherited from Resource.)
Protected method | OnSetupCloneTargets | This method prepares the CopyTo(Resource) operation for custom Resource Types. It uses reflection to prepare the cloning operation automatically, but you can implement this method in order to handle certain fields and cases manually. See SetupCloneTargets(Object, ICloneTargetSetup) for a more thorough explanation. (Inherited from Resource.)
Public method | Save(Stream) | Saves the Resource to the specified stream. (Inherited from Resource.)
Public method | Save(String, Boolean) | Saves the Resource to the specified path. (Inherited from Resource.)
Public method | ToString | (Inherited from Resource.)
Top
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader Properties

VertexShader Properties

The VertexShader type exposes the following members.

Properties
 | Name | Description
Public property | AssetInfo | [GET / SET] Provides information on the way this Resource should be treated during Asset import operations in the editor. This information is not available at runtime and can only be accessed or set outside a Launcher environment. (Inherited from Resource.)
Public property | Compiled | [GET] Whether this shader has been compiled yet or not. (Inherited from AbstractShader.)
Public property | Disposed | [GET] Returns whether the Resource has been disposed. Disposed Resources are not to be used and are treated the same as a null value by most methods. (Inherited from Resource.)
Public property | FullName | [GET] The full name of the Resource, including its path but not its file extension (Inherited from Resource.)
Public property | IsDefaultContent | [GET] Returns whether the Resource is part of Duality's embedded default content. (Inherited from Resource.)
Public property | IsRuntimeResource | [GET] Returns whether the Resource has been generated at runtime and cannot be retrieved via content path. (Inherited from Resource.)
 | Minimal | [GET] A minimal VertexShader. It performs OpenGLs default transformation and forwards a single texture coordinate and color to the fragment stage.
Public property | Name | [GET] The name of the Resource. (Inherited from Resource.)
Public property | Native | [GET] The shaders native backend. Don't use this unless you know exactly what you're doing. (Inherited from AbstractShader.)
Public property | Path | [GET] The path where this Resource has been originally loaded from or was first saved to. It is also the path under which this Resource is registered at the ContentProvider. (Inherited from Resource.)
 | SmoothAnim | [GET] The SmoothAnim VertexShader. In addition to the Minimal setup, it forwards the custom animBlend vertex attribute to the fragment stage.
Public property | Source | [GET] The shaders source code. (Inherited from AbstractShader.)
Protected property | Type | (Overrides AbstractShaderType.)
Top
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader.Minimal Property

VertexShaderMinimal Property
[GET] A minimal VertexShader. It performs OpenGLs default transformation and forwards a single texture coordinate and color to the fragment stage.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<VertexShader> Minimal { get; }

Property Value

Type: ContentRef VertexShader
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader.SmoothAnim Property

VertexShaderSmoothAnim Property
[GET] The SmoothAnim VertexShader. In addition to the Minimal setup, it forwards the custom animBlend vertex attribute to the fragment stage.

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static ContentRef<VertexShader> SmoothAnim { get; }

Property Value

Type: ContentRef VertexShader
See Also

Reference

VertexShader Class
Duality.Resources Namespace


VertexShader.Type Property

VertexShaderType Property

Namespace: Duality.Resources
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override ShaderType Type { get; }

Property Value

Type: ShaderType
See Also

Reference

VertexShader Class
Duality.Resources Namespace


Duality.Serialization Namespace

Duality.Serialization Namespace
Classes
 | Class | Description
Public class | AssignFieldError | A serialization error that occurred during the assignment of a Field. Possible causes are the Field not being available, being flagged as [DontSerialize] or having the wrong FieldType.
Public class | BinarySerializer | De/Serializes objects in a binary format. Additional metadata is included in order to allow an extended degree of error tolerance when working under development conditions.
Public class | ExtMethodsDataType | Extension methods for DataType
Public class | ObjectIdManager | Manages object IDs during de/serialization.
Public class | ResolveMemberError | A serialization error that occurred during the resolve operation of a Member.
Public class | ResolveTypeError | A serialization error that occurred during the resolve operation of a Type.
Public class | SerializeError | An abstract base class for errors that can occur during serialization to provide an interface for custom serialization fallback behaivor.
Public class | SerializeErrorHandler | Provides an abstract interface for manual serialization fallbacks to resolve Types and Members or assign Fields.
Public class | Serializer | Base class for Dualitys serializers.
Protected class | SerializerCustomSerialIOBaseT | Buffer object for custom de/serialization, providing read and write functionality.
Protected class | SerializerObjectHeader | Describes the serialization header of an object that is being de/serialized.
Public class | SerializeSurrogateT | Default base class for Serialization Surrogates. It implements both ISerializeSurrogate and ISerializeExplicit, thus being able to fully perform de/serialization of a designated object type.
Public class | SerializeType | The SerializeType class is essentially caching serialization-relevant information that has been generated basing on a Type.
Public class | TypeDataLayout | This class provides information about the data layout when de/serializing an object.
Public class | XmlSerializer | De/Serializes objects in an XML format. Additional metadata is included in order to allow an extended degree of error tolerance when working under development conditions.
Structures
 | Structure | Description
Public structure | TypeDataLayoutFieldDataInfo | Holds information about a single field.
Interfaces
 | Interface | Description
Public interface | IDataReader | Provides reading capabilities for serialization purposes
Public interface | IDataWriter | Provides writing capabilities for serialization purposes
Public interface | ISerializeExplicit | Provides a general interface for an object type with custom serialization rather than using the automatic fallback.
Public interface | ISerializeSurrogate | De/Serializes an object instead of letting it de/serialize itsself or using a Reflection-driven approach.
Public interface | IUniqueIdentifyable | An object that implements this interface is able to choose its own, fixed object id during serialization. This can under some circumstances help to minimize versioning conflicts due to a modified object id naming scheme.
Delegates
 | Delegate | Description
Public delegate | SerializerFieldBlocker | Declares a field blocker. If a field blocker returns true upon serializing a specific field, a default value is assumed instead.
Enumerations
 | Enumeration | Description
Public enumeration | DataType | This enum is used by Dualitys serializers to distinguish between certain kinds of data.


AssignFieldError Class

AssignFieldError Class
A serialization error that occurred during the assignment of a Field. Possible causes are the Field not being available, being flagged as [DontSerialize] or having the wrong FieldType.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeError
Duality.SerializationAssignFieldError

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class AssignFieldError : SerializeError

The AssignFieldError type exposes the following members.

Constructors
 | Name | Description
Public method | AssignFieldError | Initializes a new instance of the AssignFieldError class
Top
Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
Properties
 | Name | Description
Public property | AssignSuccess | [GET / SET] Whether or not the assignment was a success. Set this property to true, if you handled the error successfully.
Public property | FieldName | [GET] Name of the field to assign the value to.
Public property | FieldValue | [GET] The value to assign.
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | TargetObject | [GET] Object on which the field value should be assigned.
Public property | TargetObjectType | [GET] The target objects serialization Type data.
Top
See Also

Reference

Duality.Serialization Namespace


AssignFieldError Constructor

AssignFieldError Constructor
Initializes a new instance of the AssignFieldError class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public AssignFieldError(
    SerializeType targetObjType,
    Object targetObj,
    string fieldName,
    Object fieldValue
)

Parameters

targetObjType
Type: Duality.SerializationSerializeType
targetObj
Type: SystemObject
fieldName
Type: SystemString
fieldValue
Type: SystemObject
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError Fields

AssignFieldError Fields

The AssignFieldError type exposes the following members.

Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError Properties

AssignFieldError Properties

The AssignFieldError type exposes the following members.

Properties
 | Name | Description
Public property | AssignSuccess | [GET / SET] Whether or not the assignment was a success. Set this property to true, if you handled the error successfully.
Public property | FieldName | [GET] Name of the field to assign the value to.
Public property | FieldValue | [GET] The value to assign.
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | TargetObject | [GET] Object on which the field value should be assigned.
Public property | TargetObjectType | [GET] The target objects serialization Type data.
Top
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError.AssignSuccess Property

AssignFieldErrorAssignSuccess Property
[GET / SET] Whether or not the assignment was a success. Set this property to true, if you handled the error successfully.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool AssignSuccess { get; set; }

Property Value

Type: Boolean
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError.FieldName Property

AssignFieldErrorFieldName Property
[GET] Name of the field to assign the value to.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string FieldName { get; }

Property Value

Type: String
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError.FieldValue Property

AssignFieldErrorFieldValue Property
[GET] The value to assign.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object FieldValue { get; }

Property Value

Type: Object
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError.TargetObject Property

AssignFieldErrorTargetObject Property
[GET] Object on which the field value should be assigned.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object TargetObject { get; }

Property Value

Type: Object
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


AssignFieldError.TargetObjectType Property

AssignFieldErrorTargetObjectType Property
[GET] The target objects serialization Type data.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SerializeType TargetObjectType { get; }

Property Value

Type: SerializeType
See Also

Reference

AssignFieldError Class
Duality.Serialization Namespace


BinarySerializer Class

BinarySerializer Class
De/Serializes objects in a binary format. Additional metadata is included in order to allow an extended degree of error tolerance when working under development conditions.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializer
Duality.SerializationBinarySerializer

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class BinarySerializer : Serializer

The BinarySerializer type exposes the following members.

Constructors
 | Name | Description
Public method | BinarySerializer | Initializes a new instance of the BinarySerializer class
Top
Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker. (Inherited from Serializer.)
Protected method | AssignValueToArray | Assigns the specified value to a specific array index. (Inherited from Serializer.)
Protected method | AssignValueToField | Assigns the specified value to an objects field. (Inherited from Serializer.)
Public method | ClearFieldBlockers | Unregisters all FieldBlockers. (Inherited from Serializer.)
Public method | Dispose | (Inherited from Serializer.)
Protected method | Finalize | (Inherited from Serializer.)
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value. (Inherited from Serializer.)
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization. (Inherited from Serializer.)
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization. (Inherited from Serializer.)
Protected method | MatchesStreamFormat | (Overrides SerializerMatchesStreamFormat(Stream).)
Protected method | OnBeginReadOperation | (Overrides SerializerOnBeginReadOperation.)
Protected method | OnBeginWriteOperation | (Overrides SerializerOnBeginWriteOperation.)
Protected method | OnDisposed | (Inherited from Serializer.)
Protected method | OnEndReadOperation | (Overrides SerializerOnEndReadOperation.)
Protected method | OnEndWriteOperation | (Overrides SerializerOnEndWriteOperation.)
Protected method | OnTargetStreamChanged | (Overrides SerializerOnTargetStreamChanged(Stream, Stream).)
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information. (Inherited from Serializer.)
Public method | ReadObject | Reads a single object and returns it. (Inherited from Serializer.)
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter. (Inherited from Serializer.)
Protected method | ReadObjectData | (Overrides SerializerReadObjectData.)
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker. (Inherited from Serializer.)
Protected method | ResolveEnumValue | Resolves the specified Enum value. (Inherited from Serializer.)
Protected method | ResolveMember | Resolves the specified Member. (Inherited from Serializer.)
Protected method | ResolveType | Resolves the specified Type. (Inherited from Serializer.)
Public method | WriteObject(Object) | Writes a single object. (Inherited from Serializer.)
Public method | WriteObjectT(T) | Writes a single object. (Inherited from Serializer.)
Protected method | WriteObjectData | (Overrides SerializerWriteObjectData(Object).)
Top
Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log. (Inherited from Serializer.)
Protected field | idManager | Manages object IDs during de/serialization. (Inherited from Serializer.)
Top
Properties
 | Name | Description
Public property | CanRead | [GET] Can this Serializer read data? (Inherited from Serializer.)
Public property | CanWrite | [GET] Can this Serializer write data? (Inherited from Serializer.)
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore. (Inherited from Serializer.)
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead. (Inherited from Serializer.)
Public property | LocalLog | [GET / SET] The local de/serialization Log. (Inherited from Serializer.)
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to). (Inherited from Serializer.)
Top
See Also

Reference

Duality.Serialization Namespace


BinarySerializer Constructor

BinarySerializer Constructor
Initializes a new instance of the BinarySerializer class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public BinarySerializer()
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer Fields

BinarySerializer Fields

The BinarySerializer type exposes the following members.

Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log. (Inherited from Serializer.)
Protected field | idManager | Manages object IDs during de/serialization. (Inherited from Serializer.)
Top
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer Methods

BinarySerializer Methods

The BinarySerializer type exposes the following members.

Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker. (Inherited from Serializer.)
Protected method | AssignValueToArray | Assigns the specified value to a specific array index. (Inherited from Serializer.)
Protected method | AssignValueToField | Assigns the specified value to an objects field. (Inherited from Serializer.)
Public method | ClearFieldBlockers | Unregisters all FieldBlockers. (Inherited from Serializer.)
Public method | Dispose | (Inherited from Serializer.)
Protected method | Finalize | (Inherited from Serializer.)
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value. (Inherited from Serializer.)
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization. (Inherited from Serializer.)
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization. (Inherited from Serializer.)
Protected method | MatchesStreamFormat | (Overrides SerializerMatchesStreamFormat(Stream).)
Protected method | OnBeginReadOperation | (Overrides SerializerOnBeginReadOperation.)
Protected method | OnBeginWriteOperation | (Overrides SerializerOnBeginWriteOperation.)
Protected method | OnDisposed | (Inherited from Serializer.)
Protected method | OnEndReadOperation | (Overrides SerializerOnEndReadOperation.)
Protected method | OnEndWriteOperation | (Overrides SerializerOnEndWriteOperation.)
Protected method | OnTargetStreamChanged | (Overrides SerializerOnTargetStreamChanged(Stream, Stream).)
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information. (Inherited from Serializer.)
Public method | ReadObject | Reads a single object and returns it. (Inherited from Serializer.)
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter. (Inherited from Serializer.)
Protected method | ReadObjectData | (Overrides SerializerReadObjectData.)
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker. (Inherited from Serializer.)
Protected method | ResolveEnumValue | Resolves the specified Enum value. (Inherited from Serializer.)
Protected method | ResolveMember | Resolves the specified Member. (Inherited from Serializer.)
Protected method | ResolveType | Resolves the specified Type. (Inherited from Serializer.)
Public method | WriteObject(Object) | Writes a single object. (Inherited from Serializer.)
Public method | WriteObjectT(T) | Writes a single object. (Inherited from Serializer.)
Protected method | WriteObjectData | (Overrides SerializerWriteObjectData(Object).)
Top
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.MatchesStreamFormat Method

BinarySerializerMatchesStreamFormat Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override bool MatchesStreamFormat(
    Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: Boolean
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.OnBeginReadOperation Method

BinarySerializerOnBeginReadOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnBeginReadOperation()
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.OnBeginWriteOperation Method

BinarySerializerOnBeginWriteOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnBeginWriteOperation()
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.OnEndReadOperation Method

BinarySerializerOnEndReadOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnEndReadOperation()
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.OnEndWriteOperation Method

BinarySerializerOnEndWriteOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnEndWriteOperation()
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.OnTargetStreamChanged Method

BinarySerializerOnTargetStreamChanged Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnTargetStreamChanged(
    Stream oldStream,
    Stream newStream
)

Parameters

oldStream
Type: System.IOStream
newStream
Type: System.IOStream
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.ReadObjectData Method

BinarySerializerReadObjectData Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Object ReadObjectData()

Return Value

Type: Object
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer.WriteObjectData Method

BinarySerializerWriteObjectData Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void WriteObjectData(
    Object obj
)

Parameters

obj
Type: SystemObject
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


BinarySerializer Properties

BinarySerializer Properties

The BinarySerializer type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | [GET] Can this Serializer read data? (Inherited from Serializer.)
Public property | CanWrite | [GET] Can this Serializer write data? (Inherited from Serializer.)
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore. (Inherited from Serializer.)
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead. (Inherited from Serializer.)
Public property | LocalLog | [GET / SET] The local de/serialization Log. (Inherited from Serializer.)
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to). (Inherited from Serializer.)
Top
See Also

Reference

BinarySerializer Class
Duality.Serialization Namespace


DataType Enumeration

DataType Enumeration
This enum is used by Dualitys serializers to distinguish between certain kinds of data.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public enum DataType
Members
Member name | Value | Description
Unknown | 0 | Unknown data type
Bool | 1 | A Boolean value
Byte | 2 | A Byte value
SByte | 3 | A SByte value
Short | 4 | A Int16 value
UShort | 5 | A UInt16 value
Int | 6 | A Int32 value
UInt | 7 | A UInt32 value
Long | 8 | A Int64 value
ULong | 9 | A UInt64 value
Float | 10 | A Single value
Double | 11 | A Double value
Decimal | 12 | A Decimal value
Char | 13 | A Char value
String | 22 | A String value
Type | 14 | A Type value
MemberInfo | 27 | A MemberInfo value
Delegate | 20 | A Delegate value
Enum | 21 | A Enum value
Array | 23 | A Array value
Struct | 25 | A struct object
ObjectRef | 26 | The reference to an object
See Also

Reference

Duality.Serialization Namespace


ExtMethodsDataType Class

ExtMethodsDataType Class
Extension methods for DataType
Inheritance Hierarchy
SystemObject
Duality.SerializationExtMethodsDataType

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static class ExtMethodsDataType

The ExtMethodsDataType type exposes the following members.

Methods
Name | Description
HasObjectId | Returns whether the specified DataType requires a unique object id during serialization.
HasTypeName | Returns whether the specified DataType requires an explicit type name during serialization.
IsMemberInfoType | Returns whether the DataType represents a MemberInfo type.
IsPrimitiveType | Returns whether the DataType represents a primitive data type.
ToActualType | Returns the actual Type that is associated with the DataType.
Top
See Also

Reference

Duality.Serialization Namespace


ExtMethodsDataType Methods

ExtMethodsDataType Methods

The ExtMethodsDataType type exposes the following members.

Methods
Name | Description
HasObjectId | Returns whether the specified DataType requires a unique object id during serialization.
HasTypeName | Returns whether the specified DataType requires an explicit type name during serialization.
IsMemberInfoType | Returns whether the DataType represents a MemberInfo type.
IsPrimitiveType | Returns whether the DataType represents a primitive data type.
ToActualType | Returns the actual Type that is associated with the DataType.
Top
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


ExtMethodsDataType.HasObjectId Method

ExtMethodsDataTypeHasObjectId Method
Returns whether the specified DataType requires a unique object id during serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HasObjectId(
    this DataType dt
)

Parameters

dt
Type: Duality.SerializationDataType

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


ExtMethodsDataType.HasTypeName Method

ExtMethodsDataTypeHasTypeName Method
Returns whether the specified DataType requires an explicit type name during serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool HasTypeName(
    this DataType dt
)

Parameters

dt
Type: Duality.SerializationDataType

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


ExtMethodsDataType.IsMemberInfoType Method

ExtMethodsDataTypeIsMemberInfoType Method
Returns whether the DataType represents a MemberInfo type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsMemberInfoType(
    this DataType dt
)

Parameters

dt
Type: Duality.SerializationDataType

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


ExtMethodsDataType.IsPrimitiveType Method

ExtMethodsDataTypeIsPrimitiveType Method
Returns whether the DataType represents a primitive data type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static bool IsPrimitiveType(
    this DataType dt
)

Parameters

dt
Type: Duality.SerializationDataType

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


ExtMethodsDataType.ToActualType Method

ExtMethodsDataTypeToActualType Method
Returns the actual Type that is associated with the DataType.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type ToActualType(
    this DataType dt
)

Parameters

dt
Type: Duality.SerializationDataType

Return Value

Type: Type

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

ExtMethodsDataType Class
Duality.Serialization Namespace


IDataReader Interface

IDataReader Interface
Provides reading capabilities for serialization purposes

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IDataReader

The IDataReader type exposes the following members.

Methods
 | Name | Description
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String, T) | Reads the value that is associated with the specified name.
Top
Properties
 | Name | Description
Public property | Keys | [GET] Enumerates all available keys.
Top
See Also

Reference

Duality.Serialization Namespace


IDataReader Methods

IDataReader Methods
Methods
 | Name | Description
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String, T) | Reads the value that is associated with the specified name.
Top
See Also

Reference

IDataReader Interface
Duality.Serialization Namespace


IDataReader.ReadValue Method

IDataReaderReadValue Method
Overload List
 | Name | Description
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String) | Reads the value that is associated with the specified name.
Public method | ReadValueT(String, T) | Reads the value that is associated with the specified name.
Top
See Also

Reference

IDataReader Interface
Duality.Serialization Namespace


IDataReader.ReadValue Method (String)

IDataReaderReadValue Method (String)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Object ReadValue(
    string name
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.

Return Value

Type: Object
The value that has been read using the given name.
See Also

Reference

IDataReader Interface
ReadValue Overload
Duality.Serialization Namespace
IDataReaderReadValueT(String)
IDataReaderReadValueT(String, T)


IDataReader.ReadValue(T) Method (String)

IDataReaderReadValueT Method (String)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
T ReadValue<T>(
    string name
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.

Type Parameters

T
The expected value type.

Return Value

Type: T
The value that has been read and cast using the given name and type.
See Also

Reference

IDataReader Interface
ReadValue Overload
Duality.Serialization Namespace
IDataReaderReadValue(String)
IDataReaderReadValueT(String, T)


IDataReader.ReadValue(T) Method (String, T)

IDataReaderReadValueT Method (String, T)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void ReadValue<T>(
    string name,
    out T value
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.
value
Type: T
The value that has been read and cast using the given name and type.

Type Parameters

T
The expected value type.
See Also

Reference

IDataReader Interface
ReadValue Overload
Duality.Serialization Namespace
IDataReaderReadValue(String)
IDataReaderReadValueT(String)


IDataReader Properties

IDataReader Properties

The IDataReader type exposes the following members.

Properties
 | Name | Description
Public property | Keys | [GET] Enumerates all available keys.
Top
See Also

Reference

IDataReader Interface
Duality.Serialization Namespace


IDataReader.Keys Property

IDataReaderKeys Property
[GET] Enumerates all available keys.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
IEnumerable<string> Keys { get; }

Property Value

Type: IEnumerable String
See Also

Reference

IDataReader Interface
Duality.Serialization Namespace


IDataWriter Interface

IDataWriter Interface
Provides writing capabilities for serialization purposes

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IDataWriter

The IDataWriter type exposes the following members.

Methods
 | Name | Description
Public method | WriteValue | Writes the specified name and value.
Top
See Also

Reference

Duality.Serialization Namespace


IDataWriter Methods

IDataWriter Methods

The IDataWriter type exposes the following members.

Methods
 | Name | Description
Public method | WriteValue | Writes the specified name and value.
Top
See Also

Reference

IDataWriter Interface
Duality.Serialization Namespace


IDataWriter.WriteValue Method

IDataWriterWriteValue Method
Writes the specified name and value.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void WriteValue(
    string name,
    Object value
)

Parameters

name
Type: SystemString
The name to which the written value is mapped. May, for example, be the name of a Field to which the written value belongs, but there are no naming restrictions, except that one name can't be used twice.
value
Type: SystemObject
The value to write.
See Also

Reference

IDataWriter Interface
Duality.Serialization Namespace


ISerializeExplicit Interface

ISerializeExplicit Interface
Provides a general interface for an object type with custom serialization rather than using the automatic fallback.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ISerializeExplicit

The ISerializeExplicit type exposes the following members.

Methods
 | Name | Description
Public method | ReadData | Reads and applies the object data to the specified IDataReader.
Public method | WriteData | Writes the object data to the specified IDataWriter.
Top
See Also

Reference

Duality.Serialization Namespace


ISerializeExplicit Methods

ISerializeExplicit Methods

The ISerializeExplicit type exposes the following members.

Methods
 | Name | Description
Public method | ReadData | Reads and applies the object data to the specified IDataReader.
Public method | WriteData | Writes the object data to the specified IDataWriter.
Top
See Also

Reference

ISerializeExplicit Interface
Duality.Serialization Namespace


ISerializeExplicit.ReadData Method

ISerializeExplicitReadData Method
Reads and applies the object data to the specified IDataReader.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void ReadData(
    IDataReader reader
)

Parameters

reader
Type: Duality.SerializationIDataReader
See Also

Reference

ISerializeExplicit Interface
Duality.Serialization Namespace


ISerializeExplicit.WriteData Method

ISerializeExplicitWriteData Method
Writes the object data to the specified IDataWriter.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void WriteData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter
See Also

Reference

ISerializeExplicit Interface
Duality.Serialization Namespace


ISerializeSurrogate Interface

ISerializeSurrogate Interface
De/Serializes an object instead of letting it de/serialize itsself or using a Reflection-driven approach.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface ISerializeSurrogate

The ISerializeSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type.
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered ISurrogate is capable of de/serializing a given object type, the one with the highest priority is picked.
Public property | RealObject | [GET / SET] The object that is de/serialized
Public property | SurrogateObject | [GET] Returns a serializable object that represents the RealObject.
Top
See Also

Reference

Duality.Serialization Namespace
Duality.SerializationSerializeSurrogateT


ISerializeSurrogate Methods

ISerializeSurrogate Methods

The ISerializeSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type.
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.
Top
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.ConstructObject Method

ISerializeSurrogateConstructObject Method
Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Object ConstructObject(
    IDataReader reader,
    TypeInfo objType
)

Parameters

reader
Type: Duality.SerializationIDataReader
The IDataReader to deserialize constructor data from.
objType
Type: System.ReflectionTypeInfo
The Type of the object to create.

Return Value

Type: Object
An instance of the specified TypeInfo that has been constructed using the provided data.
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.MatchesType Method

ISerializeSurrogateMatchesType Method
Checks whether this surrogate is able to de/serialize the specified object type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo
The TypeInfo of the object in question.

Return Value

Type: Boolean
True, if this surrogate is able to de/serialize such object, false if not.
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.WriteConstructorData Method

ISerializeSurrogateWriteConstructorData Method
Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
void WriteConstructorData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter
The IDataWriter to serialize constructor data to.
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate Properties

ISerializeSurrogate Properties

The ISerializeSurrogate type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered ISurrogate is capable of de/serializing a given object type, the one with the highest priority is picked.
Public property | RealObject | [GET / SET] The object that is de/serialized
Public property | SurrogateObject | [GET] Returns a serializable object that represents the RealObject.
Top
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.Priority Property

ISerializeSurrogatePriority Property
[GET] If more than one registered ISurrogate is capable of de/serializing a given object type, the one with the highest priority is picked.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
int Priority { get; }

Property Value

Type: Int32
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.RealObject Property

ISerializeSurrogateRealObject Property
[GET / SET] The object that is de/serialized

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
Object RealObject { get; set; }

Property Value

Type: Object
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


ISerializeSurrogate.SurrogateObject Property

ISerializeSurrogateSurrogateObject Property
[GET] Returns a serializable object that represents the RealObject.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
ISerializeExplicit SurrogateObject { get; }

Property Value

Type: ISerializeExplicit
See Also

Reference

ISerializeSurrogate Interface
Duality.Serialization Namespace


IUniqueIdentifyable Interface

IUniqueIdentifyable Interface
An object that implements this interface is able to choose its own, fixed object id during serialization. This can under some circumstances help to minimize versioning conflicts due to a modified object id naming scheme.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public interface IUniqueIdentifyable

The IUniqueIdentifyable type exposes the following members.

Properties
 | Name | Description
Public property | PreferredId | [GET] The object id that will be picked preferrably for this object.
Top
See Also

Reference

Duality.Serialization Namespace


IUniqueIdentifyable Properties

IUniqueIdentifyable Properties

The IUniqueIdentifyable type exposes the following members.

Properties
 | Name | Description
Public property | PreferredId | [GET] The object id that will be picked preferrably for this object.
Top
See Also

Reference

IUniqueIdentifyable Interface
Duality.Serialization Namespace


IUniqueIdentifyable.PreferredId Property

IUniqueIdentifyablePreferredId Property
[GET] The object id that will be picked preferrably for this object.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
uint PreferredId { get; }

Property Value

Type: UInt32
See Also

Reference

IUniqueIdentifyable Interface
Duality.Serialization Namespace


ObjectIdManager Class

ObjectIdManager Class
Manages object IDs during de/serialization.
Inheritance Hierarchy
SystemObject
Duality.SerializationObjectIdManager

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ObjectIdManager

The ObjectIdManager type exposes the following members.

Constructors
 | Name | Description
Public method | ObjectIdManager | Initializes a new instance of the ObjectIdManager class
Top
Methods
 | Name | Description
Public method | Clear | Clears all object id mappings.
Public method | Inject | Assigns an id to a specific object.
Public method | Lookup | Tries to lookup an object based on its id.
Public method | PopIdLevel | Decreases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.
Public method | PushIdLevel | Increases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.
Public method | Request | Returns the id that is assigned to the specified object. Assigns one, if there is none yet.
Top
See Also

Reference

Duality.Serialization Namespace


ObjectIdManager Constructor

ObjectIdManager Constructor
Initializes a new instance of the ObjectIdManager class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ObjectIdManager()
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager Methods

ObjectIdManager Methods

The ObjectIdManager type exposes the following members.

Methods
 | Name | Description
Public method | Clear | Clears all object id mappings.
Public method | Inject | Assigns an id to a specific object.
Public method | Lookup | Tries to lookup an object based on its id.
Public method | PopIdLevel | Decreases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.
Public method | PushIdLevel | Increases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.
Public method | Request | Returns the id that is assigned to the specified object. Assigns one, if there is none yet.
Top
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.Clear Method

ObjectIdManagerClear Method
Clears all object id mappings.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.Inject Method

ObjectIdManagerInject Method
Assigns an id to a specific object.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Inject(
    Object obj,
    uint id
)

Parameters

obj
Type: SystemObject
id
Type: SystemUInt32
The id to assign. Zero ids are rejected.
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.Lookup Method

ObjectIdManagerLookup Method
Tries to lookup an object based on its id.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Lookup(
    uint id,
    out Object obj
)

Parameters

id
Type: SystemUInt32
obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.PopIdLevel Method

ObjectIdManagerPopIdLevel Method
Decreases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PopIdLevel()
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.PushIdLevel Method

ObjectIdManagerPushIdLevel Method
Increases the reference hierarchy level of the object id generator. Each level of id generation uses its own algorithm, so different levels of ids are unlikely to affect each other.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void PushIdLevel()
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ObjectIdManager.Request Method

ObjectIdManagerRequest Method
Returns the id that is assigned to the specified object. Assigns one, if there is none yet.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public uint Request(
    Object obj,
    out bool isNewId
)

Parameters

obj
Type: SystemObject
isNewId
Type: SystemBoolean

Return Value

Type: UInt32
See Also

Reference

ObjectIdManager Class
Duality.Serialization Namespace


ResolveMemberError Class

ResolveMemberError Class
A serialization error that occurred during the resolve operation of a Member.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeError
Duality.SerializationResolveMemberError

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResolveMemberError : SerializeError

The ResolveMemberError type exposes the following members.

Constructors
 | Name | Description
Public method | ResolveMemberError | Initializes a new instance of the ResolveMemberError class
Top
Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | MemberId | [GET] The Member id to resolve.
Public property | ResolvedMember | [GET / SET] The resolved Member.
Top
See Also

Reference

Duality.Serialization Namespace


ResolveMemberError Constructor

ResolveMemberError Constructor
Initializes a new instance of the ResolveMemberError class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResolveMemberError(
    string memberId
)

Parameters

memberId
Type: SystemString
See Also

Reference

ResolveMemberError Class
Duality.Serialization Namespace


ResolveMemberError Fields

ResolveMemberError Fields

The ResolveMemberError type exposes the following members.

Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
See Also

Reference

ResolveMemberError Class
Duality.Serialization Namespace


ResolveMemberError Properties

ResolveMemberError Properties

The ResolveMemberError type exposes the following members.

Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | MemberId | [GET] The Member id to resolve.
Public property | ResolvedMember | [GET / SET] The resolved Member.
Top
See Also

Reference

ResolveMemberError Class
Duality.Serialization Namespace


ResolveMemberError.MemberId Property

ResolveMemberErrorMemberId Property
[GET] The Member id to resolve.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string MemberId { get; }

Property Value

Type: String
See Also

Reference

ResolveMemberError Class
Duality.Serialization Namespace


ResolveMemberError.ResolvedMember Property

ResolveMemberErrorResolvedMember Property
[GET / SET] The resolved Member.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public MemberInfo ResolvedMember { get; set; }

Property Value

Type: MemberInfo
See Also

Reference

ResolveMemberError Class
Duality.Serialization Namespace


ResolveTypeError Class

ResolveTypeError Class
A serialization error that occurred during the resolve operation of a Type.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeError
Duality.SerializationResolveTypeError

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class ResolveTypeError : SerializeError

The ResolveTypeError type exposes the following members.

Constructors
 | Name | Description
Public method | ResolveTypeError | Initializes a new instance of the ResolveTypeError class
Top
Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | ResolvedType | [GET / SET] The resolved Type.
Public property | TypeId | [GET] The Type id to resolve.
Top
See Also

Reference

Duality.Serialization Namespace


ResolveTypeError Constructor

ResolveTypeError Constructor
Initializes a new instance of the ResolveTypeError class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ResolveTypeError(
    string typeId
)

Parameters

typeId
Type: SystemString
See Also

Reference

ResolveTypeError Class
Duality.Serialization Namespace


ResolveTypeError Fields

ResolveTypeError Fields

The ResolveTypeError type exposes the following members.

Fields
 | Name | Description
Protected field | handled | (Inherited from SerializeError.)
Top
See Also

Reference

ResolveTypeError Class
Duality.Serialization Namespace


ResolveTypeError Properties

ResolveTypeError Properties

The ResolveTypeError type exposes the following members.

Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully. (Inherited from SerializeError.)
Public property | ResolvedType | [GET / SET] The resolved Type.
Public property | TypeId | [GET] The Type id to resolve.
Top
See Also

Reference

ResolveTypeError Class
Duality.Serialization Namespace


ResolveTypeError.ResolvedType Property

ResolveTypeErrorResolvedType Property
[GET / SET] The resolved Type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Type ResolvedType { get; set; }

Property Value

Type: Type
See Also

Reference

ResolveTypeError Class
Duality.Serialization Namespace


ResolveTypeError.TypeId Property

ResolveTypeErrorTypeId Property
[GET] The Type id to resolve.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string TypeId { get; }

Property Value

Type: String
See Also

Reference

ResolveTypeError Class
Duality.Serialization Namespace


SerializeError Class

SerializeError Class
An abstract base class for errors that can occur during serialization to provide an interface for custom serialization fallback behaivor.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeError
Duality.SerializationAssignFieldError
Duality.SerializationResolveMemberError
Duality.SerializationResolveTypeError

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class SerializeError

The SerializeError type exposes the following members.

Constructors
 | Name | Description
Protected method | SerializeError | Initializes a new instance of the SerializeError class
Top
Fields
 | Name | Description
Protected field | handled |
Top
Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully.
Top
See Also

Reference

Duality.Serialization Namespace


SerializeError Constructor

SerializeError Constructor
Initializes a new instance of the SerializeError class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SerializeError()
See Also

Reference

SerializeError Class
Duality.Serialization Namespace


SerializeError Fields

SerializeError Fields

The SerializeError type exposes the following members.

Fields
 | Name | Description
Protected field | handled |
Top
See Also

Reference

SerializeError Class
Duality.Serialization Namespace


SerializeError.handled Field

SerializeErrorhandled Field

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected bool handled

Field Value

Type: Boolean
See Also

Reference

SerializeError Class
Duality.Serialization Namespace


SerializeError Properties

SerializeError Properties

The SerializeError type exposes the following members.

Properties
 | Name | Description
Public property | Handled | [GET] Returns whether the error has been handled successfully.
Top
See Also

Reference

SerializeError Class
Duality.Serialization Namespace


SerializeError.Handled Property

SerializeErrorHandled Property
[GET] Returns whether the error has been handled successfully.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Handled { get; }

Property Value

Type: Boolean
See Also

Reference

SerializeError Class
Duality.Serialization Namespace


SerializeErrorHandler Class

SerializeErrorHandler Class
Provides an abstract interface for manual serialization fallbacks to resolve Types and Members or assign Fields.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeErrorHandler

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class SerializeErrorHandler

The SerializeErrorHandler type exposes the following members.

Constructors
 | Name | Description
Protected method | SerializeErrorHandler | Initializes a new instance of the SerializeErrorHandler class
Top
Methods
 | Name | Description
Public method | HandleError | Handles the specified error.
Top
Properties
 | Name | Description
Public property | Priority | The handlers priority. A higher value makes it more significant above others.
Top
See Also

Reference

Duality.Serialization Namespace


SerializeErrorHandler Constructor

SerializeErrorHandler Constructor
Initializes a new instance of the SerializeErrorHandler class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SerializeErrorHandler()
See Also

Reference

SerializeErrorHandler Class
Duality.Serialization Namespace


SerializeErrorHandler Methods

SerializeErrorHandler Methods

The SerializeErrorHandler type exposes the following members.

Methods
 | Name | Description
Public method | HandleError | Handles the specified error.
Top
See Also

Reference

SerializeErrorHandler Class
Duality.Serialization Namespace


SerializeErrorHandler.HandleError Method

SerializeErrorHandlerHandleError Method
Handles the specified error.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void HandleError(
    SerializeError error
)

Parameters

error
Type: Duality.SerializationSerializeError
See Also

Reference

SerializeErrorHandler Class
Duality.Serialization Namespace


SerializeErrorHandler Properties

SerializeErrorHandler Properties

The SerializeErrorHandler type exposes the following members.

Properties
 | Name | Description
Public property | Priority | The handlers priority. A higher value makes it more significant above others.
Top
See Also

Reference

SerializeErrorHandler Class
Duality.Serialization Namespace


SerializeErrorHandler.Priority Property

SerializeErrorHandlerPriority Property
The handlers priority. A higher value makes it more significant above others.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual int Priority { get; }

Property Value

Type: Int32
See Also

Reference

SerializeErrorHandler Class
Duality.Serialization Namespace


Serializer Class

Serializer Class
Base class for Dualitys serializers.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializer
Duality.SerializationBinarySerializer
Duality.SerializationXmlSerializer

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class Serializer : IDisposable

The Serializer type exposes the following members.

Constructors
 | Name | Description
Protected method | Serializer | Initializes a new instance of the Serializer class
Top
Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker.
Protected method | AssignValueToArray | Assigns the specified value to a specific array index.
Protected method | AssignValueToField | Assigns the specified value to an objects field.
Public method | ClearFieldBlockers | Unregisters all FieldBlockers.
 | Create | Creates a new Serializer using the specified stream for I/O.
 | Detect | Uses a (seekable, random access) Stream to detect the serializer that can handle it.
Public method | Dispose | Releases all resources used by the Serializer
Protected method | Finalize | (Overrides ObjectFinalize.)
 | GetSerializeType | Returns the SerializeType of a Type.
 | GetSurrogateFor | Retrieves a matching ISerializeSurrogate for the specified Type.
 | HandleSerializeError | Attempts to handle a serialization error dynamically by invoking available SerializeErrorHandlers.
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value.
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization.
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization.
Protected method | MatchesStreamFormat | Determines whether or not the specified Stream matches the required format by this Serializer. This is used to determine which Serializer can be used for any given input Stream.
Protected method | OnBeginReadOperation | Signals the beginning of an atomic ReadObject operation.
Protected method | OnBeginWriteOperation | Signals the beginning of an atomic WriteObject operation.
Protected method | OnDisposed |
Protected method | OnEndReadOperation | Signals the end of an atomic ReadObject operation.
Protected method | OnEndWriteOperation | Signals the end of an atomic WriteObject operation.
Protected method | OnTargetStreamChanged | Called when the target stream this Serializer operates on has changed.
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information.
Public method | ReadObject | Reads a single object and returns it.
Public method | ReadObjectT | Reads a single object, casts it to the specified Type and returns it.
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter.
 | ReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream.
 | ReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file.
Protected method | ReadObjectData | Writes the specified object including all referenced objects.
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker.
Protected method | ResolveEnumValue | Resolves the specified Enum value.
Protected method | ResolveMember | Resolves the specified Member.
Protected method | ResolveType | Resolves the specified Type.
 | TryReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream, expecting that it might fail. This method does not throw an Exception when the file does not exist or an expected error occurred during the read operation. Instead, it will simply return null in these cases.
 | TryReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file, expecting that it might fail. This method does not throw an Exception when the file does not exist or another error occurred during the read operation. Instead, it will simply return null in these cases.
Public method | WriteObject(Object) | Writes a single object.
Public method | WriteObjectT(T) | Writes a single object.
 | WriteObjectT(T, Stream, Type) | Saves an object to the specified data stream.
 | WriteObjectT(T, String, Type) | Saves an object to the specified data file. If it already exists, the file will be overwritten. Automatically creates the appropriate directory structure, if it doesn't exist yet.
Protected method | WriteObjectData | Reads an object including all referenced objects.
Top
Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log.
Protected field | idManager | Manages object IDs during de/serialization.
Top
Properties
 | Name | Description
 | AvailableTypes | [GET] Enumerates all available Serializer types.
Public property | CanRead | [GET] Can this Serializer read data?
Public property | CanWrite | [GET] Can this Serializer write data?
 | DefaultType | [GET / SET] The default Serializer type to use, if no other is specified.
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore.
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead.
Public property | LocalLog | [GET / SET] The local de/serialization Log.
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to).
Top
See Also

Reference

Duality.Serialization Namespace


Serializer Constructor

Serializer Constructor
Initializes a new instance of the Serializer class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Serializer()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer Fields

Serializer Fields

The Serializer type exposes the following members.

Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log.
Protected field | idManager | Manages object IDs during de/serialization.
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.fieldBlockers Field

SerializerfieldBlockers Field
The de/serialization Log.
A list of field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected List<SerializerFieldBlocker> fieldBlockers

Field Value

Type: List SerializerFieldBlocker
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.idManager Field

SerializeridManager Field
Manages object IDs during de/serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected ObjectIdManager idManager

Field Value

Type: ObjectIdManager
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer Methods

Serializer Methods

The Serializer type exposes the following members.

Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker.
Protected method | AssignValueToArray | Assigns the specified value to a specific array index.
Protected method | AssignValueToField | Assigns the specified value to an objects field.
Public method | ClearFieldBlockers | Unregisters all FieldBlockers.
 | Create | Creates a new Serializer using the specified stream for I/O.
 | Detect | Uses a (seekable, random access) Stream to detect the serializer that can handle it.
Public method | Dispose |
Protected method | Finalize | (Overrides ObjectFinalize.)
 | GetSerializeType | Returns the SerializeType of a Type.
 | GetSurrogateFor | Retrieves a matching ISerializeSurrogate for the specified Type.
 | HandleSerializeError | Attempts to handle a serialization error dynamically by invoking available SerializeErrorHandlers.
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value.
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization.
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization.
Protected method | MatchesStreamFormat | Determines whether or not the specified Stream matches the required format by this Serializer. This is used to determine which Serializer can be used for any given input Stream.
Protected method | OnBeginReadOperation | Signals the beginning of an atomic ReadObject operation.
Protected method | OnBeginWriteOperation | Signals the beginning of an atomic WriteObject operation.
Protected method | OnDisposed |
Protected method | OnEndReadOperation | Signals the end of an atomic ReadObject operation.
Protected method | OnEndWriteOperation | Signals the end of an atomic WriteObject operation.
Protected method | OnTargetStreamChanged | Called when the target stream this Serializer operates on has changed.
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information.
Public method | ReadObject | Reads a single object and returns it.
Public method | ReadObjectT | Reads a single object, casts it to the specified Type and returns it.
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter.
 | ReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream.
 | ReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file.
Protected method | ReadObjectData | Writes the specified object including all referenced objects.
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker.
Protected method | ResolveEnumValue | Resolves the specified Enum value.
Protected method | ResolveMember | Resolves the specified Member.
Protected method | ResolveType | Resolves the specified Type.
 | TryReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream, expecting that it might fail. This method does not throw an Exception when the file does not exist or an expected error occurred during the read operation. Instead, it will simply return null in these cases.
 | TryReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file, expecting that it might fail. This method does not throw an Exception when the file does not exist or another error occurred during the read operation. Instead, it will simply return null in these cases.
Public method | WriteObject(Object) | Writes a single object.
Public method | WriteObjectT(T) | Writes a single object.
 | WriteObjectT(T, Stream, Type) | Saves an object to the specified data stream.
 | WriteObjectT(T, String, Type) | Saves an object to the specified data file. If it already exists, the file will be overwritten. Automatically creates the appropriate directory structure, if it doesn't exist yet.
Protected method | WriteObjectData | Reads an object including all referenced objects.
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.AddFieldBlocker Method

SerializerAddFieldBlocker Method
Registers a new FieldBlocker.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void AddFieldBlocker(
    SerializerFieldBlocker blocker
)

Parameters

blocker
Type: Duality.SerializationSerializerFieldBlocker
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.AssignValueToArray Method

SerializerAssignValueToArray Method
Assigns the specified value to a specific array index.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void AssignValueToArray(
    SerializeType elementSerializeType,
    Array array,
    int index,
    Object value
)

Parameters

elementSerializeType
Type: Duality.SerializationSerializeType
array
Type: SystemArray
index
Type: SystemInt32
value
Type: SystemObject
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.AssignValueToField Method

SerializerAssignValueToField Method
Assigns the specified value to an objects field.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void AssignValueToField(
    SerializeType objSerializeType,
    Object obj,
    string fieldName,
    Object fieldValue
)

Parameters

objSerializeType
Type: Duality.SerializationSerializeType
obj
Type: SystemObject
fieldName
Type: SystemString
fieldValue
Type: SystemObject
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ClearFieldBlockers Method

SerializerClearFieldBlockers Method
Unregisters all FieldBlockers.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ClearFieldBlockers()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.Create Method

SerializerCreate Method
Creates a new Serializer using the specified stream for I/O.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Serializer Create(
    Stream stream,
    Type preferredSerializer = null
)

Parameters

stream
Type: System.IOStream
The stream to use.
preferredSerializer (Optional)
Type: SystemType
The serialization method to prefer. Auto-detection is used when not specified explicitly and the underlying stream supports seeking / random access. Otherwise, the DefaultType is used.

Return Value

Type: Serializer
A newly created Serializer meeting the specified criteria.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.Detect Method

SerializerDetect Method
Uses a (seekable, random access) Stream to detect the serializer that can handle it.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type Detect(
    Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: Type
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.Dispose Method

SerializerDispose Method
Releases all resources used by the Serializer

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.Finalize Method

SerializerFinalize Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void Finalize()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.GetSerializeType Method

SerializerGetSerializeType Method
Returns the SerializeType of a Type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected static SerializeType GetSerializeType(
    Type type
)

Parameters

type
Type: SystemType

Return Value

Type: SerializeType
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.GetSurrogateFor Method

SerializerGetSurrogateFor Method
Retrieves a matching ISerializeSurrogate for the specified Type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected static ISerializeSurrogate GetSurrogateFor(
    TypeInfo type
)

Parameters

type
Type: System.ReflectionTypeInfo

Return Value

Type: ISerializeSurrogate
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.HandleSerializeError Method

SerializerHandleSerializeError Method
Attempts to handle a serialization error dynamically by invoking available SerializeErrorHandlers.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected static bool HandleSerializeError(
    SerializeError error
)

Parameters

error
Type: Duality.SerializationSerializeError

Return Value

Type: Boolean
Returns true, if the error has been handled successfully.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.IsFieldBlocked Method

SerializerIsFieldBlocked Method
Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsFieldBlocked(
    FieldInfo field,
    Object obj
)

Parameters

field
Type: System.ReflectionFieldInfo
The field in question.
obj
Type: SystemObject
The object where this field originates from.

Return Value

Type: Boolean
True, if the field is blocked, false if not.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.LogCustomDeserializationError Method

SerializerLogCustomDeserializationError Method
Logs an error that occurred during custom deserialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void LogCustomDeserializationError(
    uint objId,
    TypeInfo serializeType,
    Exception e
)

Parameters

objId
Type: SystemUInt32
The object id of the affected object.
serializeType
Type: System.ReflectionTypeInfo
The Type of the affected object.
e
Type: SystemException
The Exception that occurred.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.LogCustomSerializationError Method

SerializerLogCustomSerializationError Method
Logs an error that occurred during custom serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected void LogCustomSerializationError(
    uint objId,
    TypeInfo serializeType,
    Exception e
)

Parameters

objId
Type: SystemUInt32
The object id of the affected object.
serializeType
Type: System.ReflectionTypeInfo
The Type of the affected object.
e
Type: SystemException
The Exception that occurred.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.MatchesStreamFormat Method

SerializerMatchesStreamFormat Method
Determines whether or not the specified Stream matches the required format by this Serializer. This is used to determine which Serializer can be used for any given input Stream.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract bool MatchesStreamFormat(
    Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: Boolean
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnBeginReadOperation Method

SerializerOnBeginReadOperation Method
Signals the beginning of an atomic ReadObject operation.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnBeginReadOperation()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnBeginWriteOperation Method

SerializerOnBeginWriteOperation Method
Signals the beginning of an atomic WriteObject operation.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnBeginWriteOperation()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnDisposed Method

SerializerOnDisposed Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnDisposed(
    bool manually
)

Parameters

manually
Type: SystemBoolean
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnEndReadOperation Method

SerializerOnEndReadOperation Method
Signals the end of an atomic ReadObject operation.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnEndReadOperation()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnEndWriteOperation Method

SerializerOnEndWriteOperation Method
Signals the end of an atomic WriteObject operation.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnEndWriteOperation()
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.OnTargetStreamChanged Method

SerializerOnTargetStreamChanged Method
Called when the target stream this Serializer operates on has changed.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected virtual void OnTargetStreamChanged(
    Stream oldStream,
    Stream newStream
)

Parameters

oldStream
Type: System.IOStream
newStream
Type: System.IOStream
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.PrepareWriteObject Method

SerializerPrepareWriteObject Method
Prepares an object for serialization and generates its header information.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SerializerObjectHeader PrepareWriteObject(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to write

Return Value

Type: SerializerObjectHeader
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ReadObject Method

SerializerReadObject Method
Overload List
 | Name | Description
Public method | ReadObject | Reads a single object and returns it.
Public method | ReadObjectT | Reads a single object, casts it to the specified Type and returns it.
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter.
 | ReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream.
 | ReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file.
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ReadObject Method

SerializerReadObject Method
Reads a single object and returns it.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object ReadObject()

Return Value

Type: Object
See Also

Reference

Serializer Class
ReadObject Overload
Duality.Serialization Namespace


Serializer.ReadObject(T) Method

SerializerReadObjectT Method
Reads a single object, casts it to the specified Type and returns it.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public T ReadObject<T>()

Type Parameters

T

Return Value

Type: T
See Also

Reference

Serializer Class
ReadObject Overload
Duality.Serialization Namespace


Serializer.ReadObject(T) Method (T)

SerializerReadObjectT Method (T)
Reads a single object, casts it to the specified Type and returns it via output parameter.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ReadObject<T>(
    out T obj
)

Parameters

obj
Type: T

Type Parameters

T
See Also

Reference

Serializer Class
ReadObject Overload
Duality.Serialization Namespace


Serializer.ReadObject(T) Method (Stream, Type)

SerializerReadObjectT Method (Stream, Type)
Reads an object of the specified Type from an existing data Stream.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T ReadObject<T>(
    Stream stream,
    Type preferredSerializer = null
)

Parameters

stream
Type: System.IOStream
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T

Return Value

Type: T
See Also

Reference

Serializer Class
ReadObject Overload
Duality.Serialization Namespace


Serializer.ReadObject(T) Method (String, Type)

SerializerReadObjectT Method (String, Type)
Reads an object of the specified Type from an existing data file.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T ReadObject<T>(
    string file,
    Type preferredSerializer = null
)

Parameters

file
Type: SystemString
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T

Return Value

Type: T
See Also

Reference

Serializer Class
ReadObject Overload
Duality.Serialization Namespace


Serializer.ReadObjectData Method

SerializerReadObjectData Method
Writes the specified object including all referenced objects.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract Object ReadObjectData()

Return Value

Type: Object
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.RemoveFieldBlocker Method

SerializerRemoveFieldBlocker Method
Unregisters an existing FieldBlocker.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void RemoveFieldBlocker(
    SerializerFieldBlocker blocker
)

Parameters

blocker
Type: Duality.SerializationSerializerFieldBlocker
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ResolveEnumValue Method

SerializerResolveEnumValue Method
Resolves the specified Enum value.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Enum ResolveEnumValue(
    Type enumType,
    string enumField,
    long value
)

Parameters

enumType
Type: SystemType
enumField
Type: SystemString
value
Type: SystemInt64

Return Value

Type: Enum
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ResolveMember Method

SerializerResolveMember Method
Resolves the specified Member.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected MemberInfo ResolveMember(
    string memberId,
    uint objId = 4294967295
)

Parameters

memberId
Type: SystemString
objId (Optional)
Type: SystemUInt32

Return Value

Type: MemberInfo
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.ResolveType Method

SerializerResolveType Method
Resolves the specified Type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Type ResolveType(
    string typeId,
    uint objId = 4294967295
)

Parameters

typeId
Type: SystemString
objId (Optional)
Type: SystemUInt32

Return Value

Type: Type
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.TryReadObject Method

SerializerTryReadObject Method
Overload List
Name | Description
TryReadObjectT(Stream, Type) | Reads an object of the specified Type from an existing data Stream, expecting that it might fail. This method does not throw an Exception when the file does not exist or an expected error occurred during the read operation. Instead, it will simply return null in these cases.
TryReadObjectT(String, Type) | Reads an object of the specified Type from an existing data file, expecting that it might fail. This method does not throw an Exception when the file does not exist or another error occurred during the read operation. Instead, it will simply return null in these cases.
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.TryReadObject(T) Method (Stream, Type)

SerializerTryReadObjectT Method (Stream, Type)
Reads an object of the specified Type from an existing data Stream, expecting that it might fail. This method does not throw an Exception when the file does not exist or an expected error occurred during the read operation. Instead, it will simply return null in these cases.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T TryReadObject<T>(
    Stream stream,
    Type preferredSerializer = null
)

Parameters

stream
Type: System.IOStream
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T

Return Value

Type: T
See Also

Reference

Serializer Class
TryReadObject Overload
Duality.Serialization Namespace


Serializer.TryReadObject(T) Method (String, Type)

SerializerTryReadObjectT Method (String, Type)
Reads an object of the specified Type from an existing data file, expecting that it might fail. This method does not throw an Exception when the file does not exist or another error occurred during the read operation. Instead, it will simply return null in these cases.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static T TryReadObject<T>(
    string file,
    Type preferredSerializer = null
)

Parameters

file
Type: SystemString
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T

Return Value

Type: T
See Also

Reference

Serializer Class
TryReadObject Overload
Duality.Serialization Namespace


Serializer.WriteObject Method

SerializerWriteObject Method
Overload List
 | Name | Description
Public method | WriteObject(Object) | Writes a single object.
Public method | WriteObjectT(T) | Writes a single object.
 | WriteObjectT(T, Stream, Type) | Saves an object to the specified data stream.
 | WriteObjectT(T, String, Type) | Saves an object to the specified data file. If it already exists, the file will be overwritten. Automatically creates the appropriate directory structure, if it doesn't exist yet.
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.WriteObject Method (Object)

SerializerWriteObject Method (Object)
Writes a single object.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void WriteObject(
    Object obj
)

Parameters

obj
Type: SystemObject
See Also

Reference

Serializer Class
WriteObject Overload
Duality.Serialization Namespace


Serializer.WriteObject(T) Method (T)

SerializerWriteObjectT Method (T)
Writes a single object.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void WriteObject<T>(
    T obj
)

Parameters

obj
Type: T

Type Parameters

T
See Also

Reference

Serializer Class
WriteObject Overload
Duality.Serialization Namespace


Serializer.WriteObject(T) Method (T, Stream, Type)

SerializerWriteObjectT Method (T, Stream, Type)
Saves an object to the specified data stream.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void WriteObject<T>(
    T obj,
    Stream stream,
    Type preferredSerializer = null
)

Parameters

obj
Type: T
stream
Type: System.IOStream
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T
See Also

Reference

Serializer Class
WriteObject Overload
Duality.Serialization Namespace


Serializer.WriteObject(T) Method (T, String, Type)

SerializerWriteObjectT Method (T, String, Type)
Saves an object to the specified data file. If it already exists, the file will be overwritten. Automatically creates the appropriate directory structure, if it doesn't exist yet.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static void WriteObject<T>(
    T obj,
    string file,
    Type preferredSerializer = null
)

Parameters

obj
Type: T
file
Type: SystemString
preferredSerializer (Optional)
Type: SystemType

Type Parameters

T
See Also

Reference

Serializer Class
WriteObject Overload
Duality.Serialization Namespace


Serializer.WriteObjectData Method

SerializerWriteObjectData Method
Reads an object including all referenced objects.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract void WriteObjectData(
    Object obj
)

Parameters

obj
Type: SystemObject

Return Value

Type:
The object that has been read.
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer Properties

Serializer Properties

The Serializer type exposes the following members.

Properties
 | Name | Description
 | AvailableTypes | [GET] Enumerates all available Serializer types.
Public property | CanRead | [GET] Can this Serializer read data?
Public property | CanWrite | [GET] Can this Serializer write data?
 | DefaultType | [GET / SET] The default Serializer type to use, if no other is specified.
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore.
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead.
Public property | LocalLog | [GET / SET] The local de/serialization Log.
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to).
Top
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.AvailableTypes Property

SerializerAvailableTypes Property
[GET] Enumerates all available Serializer types.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static IEnumerable<Type> AvailableTypes { get; }

Property Value

Type: IEnumerable Type
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.CanRead Property

SerializerCanRead Property
[GET] Can this Serializer read data?

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool CanRead { get; }

Property Value

Type: Boolean
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.CanWrite Property

SerializerCanWrite Property
[GET] Can this Serializer write data?

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool CanWrite { get; }

Property Value

Type: Boolean
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.DefaultType Property

SerializerDefaultType Property
[GET / SET] The default Serializer type to use, if no other is specified.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public static Type DefaultType { get; set; }

Property Value

Type: Type
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.Disposed Property

SerializerDisposed Property
[GET] Whether this formatter has been disposed. A disposed object cannot be used anymore.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool Disposed { get; }

Property Value

Type: Boolean
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.FieldBlockers Property

SerializerFieldBlockers Property
[GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<SerializerFieldBlocker> FieldBlockers { get; }

Property Value

Type: IEnumerable SerializerFieldBlocker
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.LocalLog Property

SerializerLocalLog Property
[GET / SET] The local de/serialization Log.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Log LocalLog { get; set; }

Property Value

Type: Log
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.TargetStream Property

SerializerTargetStream Property
[GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to).

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Stream TargetStream { get; set; }

Property Value

Type: Stream
See Also

Reference

Serializer Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T) Class

SerializerCustomSerialIOBaseT Class
Buffer object for custom de/serialization, providing read and write functionality.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializerCustomSerialIOBaseT

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected abstract class CustomSerialIOBase<T> : IDataReader,
    IDataWriter
where T : Serializer

Type Parameters

T

The SerializerCustomSerialIOBaseT type exposes the following members.

Constructors
 | Name | Description
Protected method | SerializerCustomSerialIOBaseT | Initializes a new instance of the SerializerCustomSerialIOBaseT class
Top
Methods
 | Name | Description
Public method | Clear | Clears all contained data.
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String, U) | Reads the value that is associated with the specified name.
Public method | WriteValue | Writes the specified name and value.
Top
Fields
 | Name | Description
Protected field | data |
Top
Properties
 | Name | Description
Public property | Data | [GET] Enumerates all currently stored KeyValuePairs.
Public property | Keys | [GET] Enumerates all available keys.
Top
See Also

Reference

Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T) Constructor

SerializerCustomSerialIOBaseT Constructor
Initializes a new instance of the SerializerCustomSerialIOBaseT class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected CustomSerialIOBase()
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


CustomSerialIOBase(T) Fields

CustomSerialIOBaseT Fields

The SerializerCustomSerialIOBaseT generic type exposes the following members.

Fields
 | Name | Description
Protected field | data |
Top
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T).data Field

SerializerCustomSerialIOBaseTdata Field

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected Dictionary<string, Object> data

Field Value

Type: Dictionary String, Object
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


CustomSerialIOBase(T) Methods

CustomSerialIOBaseT Methods

The SerializerCustomSerialIOBaseT generic type exposes the following members.

Methods
 | Name | Description
Public method | Clear | Clears all contained data.
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String, U) | Reads the value that is associated with the specified name.
Public method | WriteValue | Writes the specified name and value.
Top
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T).Clear Method

SerializerCustomSerialIOBaseTClear Method
Clears all contained data.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Clear()
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


CustomSerialIOBase(T).ReadValue Method

CustomSerialIOBaseTReadValue Method
Overload List
 | Name | Description
Public method | ReadValue(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String) | Reads the value that is associated with the specified name.
Public method | ReadValueU(String, U) | Reads the value that is associated with the specified name.
Top
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T).ReadValue Method (String)

SerializerCustomSerialIOBaseTReadValue Method (String)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object ReadValue(
    string name
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.

Return Value

Type: Object
The value that has been read using the given name.

Implements

IDataReaderReadValue(String)
See Also

Reference

SerializerCustomSerialIOBaseT Class
ReadValue Overload
Duality.Serialization Namespace
Duality.SerializationIDataReader
SerializerCustomSerialIOBaseTReadValueU(String)
SerializerCustomSerialIOBaseTReadValueU(String, U)


Serializer.CustomSerialIOBase(T).ReadValue(U) Method (String)

SerializerCustomSerialIOBaseTReadValueU Method (String)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public U ReadValue<U>(
    string name
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.

Type Parameters

U
The expected value type.

Return Value

Type: U
The value that has been read and cast using the given name and type.
See Also

Reference

SerializerCustomSerialIOBaseT Class
ReadValue Overload
Duality.Serialization Namespace
Duality.SerializationIDataReader
SerializerCustomSerialIOBaseTReadValue(String)
SerializerCustomSerialIOBaseTReadValueU(String, U)


Serializer.CustomSerialIOBase(T).ReadValue(U) Method (String, U)

SerializerCustomSerialIOBaseTReadValueU Method (String, U)
Reads the value that is associated with the specified name.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void ReadValue<U>(
    string name,
    out U value
)

Parameters

name
Type: SystemString
The name that is used for retrieving the value.
value
Type: U
The value that has been read and cast using the given name and type.

Type Parameters

U
The expected value type.

Implements

IDataReaderReadValueT(String, T)
See Also

Reference

SerializerCustomSerialIOBaseT Class
ReadValue Overload
Duality.Serialization Namespace
Duality.SerializationIDataReader
SerializerCustomSerialIOBaseTReadValue(String)
SerializerCustomSerialIOBaseTReadValueU(String)


Serializer.CustomSerialIOBase(T).WriteValue Method

SerializerCustomSerialIOBaseTWriteValue Method
Writes the specified name and value.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void WriteValue(
    string name,
    Object value
)

Parameters

name
Type: SystemString
The name to which the written value is mapped. May, for example, be the name of a Field to which the written value belongs, but there are no naming restrictions, except that one name can't be used twice.
value
Type: SystemObject
The value to write.

Implements

IDataWriterWriteValue(String, Object)
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace
Duality.SerializationIDataWriter


CustomSerialIOBase(T) Properties

CustomSerialIOBaseT Properties

The SerializerCustomSerialIOBaseT generic type exposes the following members.

Properties
 | Name | Description
Public property | Data | [GET] Enumerates all currently stored KeyValuePairs.
Public property | Keys | [GET] Enumerates all available keys.
Top
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T).Data Property

SerializerCustomSerialIOBaseTData Property
[GET] Enumerates all currently stored KeyValuePairs.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<KeyValuePair<string, Object>> Data { get; }

Property Value

Type: IEnumerable KeyValuePair String, Object
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.CustomSerialIOBase(T).Keys Property

SerializerCustomSerialIOBaseTKeys Property
[GET] Enumerates all available keys.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public IEnumerable<string> Keys { get; }

Property Value

Type: IEnumerable String

Implements

IDataReaderKeys
See Also

Reference

SerializerCustomSerialIOBaseT Class
Duality.Serialization Namespace


Serializer.FieldBlocker Delegate

SerializerFieldBlocker Delegate
Declares a field blocker. If a field blocker returns true upon serializing a specific field, a default value is assumed instead.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public delegate bool FieldBlocker(
    FieldInfo field,
    Object obj
)

Parameters

field
Type: System.ReflectionFieldInfo
obj
Type: SystemObject

Return Value

Type: Boolean
See Also

Reference

Duality.Serialization Namespace


Serializer.ObjectHeader Class

SerializerObjectHeader Class
Describes the serialization header of an object that is being de/serialized.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializerObjectHeader

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected class ObjectHeader

The SerializerObjectHeader type exposes the following members.

Constructors
 | Name | Description
Public method | SerializerObjectHeader(UInt32, DataType, SerializeType) | Initializes a new instance of the SerializerObjectHeader class
Public method | SerializerObjectHeader(UInt32, DataType, String) | Initializes a new instance of the SerializerObjectHeader class
Top
Properties
 | Name | Description
Public property | DataType | [GET] The objects data type.
Public property | IsObjectIdRequired | [GET] Returns whether this kind of object requires an ObjectId to be fully described during serialization.
Public property | IsObjectTypeRequired | [GET] Returns whether this kind of object requires an explicit ObjectType to be fully described described during serialization.
Public property | IsPrimitive | [GET] Whether or not the object is considered a primitive value according to its DataType.
Public property | ObjectId | [GET] The objects unique ID. May be zero for non-referenced object types.
Public property | ObjectType | [GET] The objects resolved type information. May be unavailable / null when loading objects.
Public property | SerializeType | [GET] The objects resolved serialization type information. May be unavailable / null when loading objects.
Public property | TypeString | [GET] The string representing this objects type in the serialized data stream.
Top
See Also

Reference

Duality.Serialization Namespace


ObjectHeader Constructor

ObjectHeader Constructor
Overload List
 | Name | Description
Public method | SerializerObjectHeader(UInt32, DataType, SerializeType) | Initializes a new instance of the SerializerObjectHeader class
Public method | SerializerObjectHeader(UInt32, DataType, String) | Initializes a new instance of the SerializerObjectHeader class
Top
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader Constructor (UInt32, DataType, SerializeType)

SerializerObjectHeader Constructor (UInt32, DataType, SerializeType)
Initializes a new instance of the SerializerObjectHeader class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ObjectHeader(
    uint id,
    DataType dataType,
    SerializeType serializeType
)

Parameters

id
Type: SystemUInt32
dataType
Type: Duality.SerializationDataType
serializeType
Type: Duality.SerializationSerializeType
See Also

Reference

SerializerObjectHeader Class
SerializerObjectHeader Overload
Duality.Serialization Namespace


Serializer.ObjectHeader Constructor (UInt32, DataType, String)

SerializerObjectHeader Constructor (UInt32, DataType, String)
Initializes a new instance of the SerializerObjectHeader class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public ObjectHeader(
    uint id,
    DataType dataType,
    string unresolvedTypeString
)

Parameters

id
Type: SystemUInt32
dataType
Type: Duality.SerializationDataType
unresolvedTypeString
Type: SystemString
See Also

Reference

SerializerObjectHeader Class
SerializerObjectHeader Overload
Duality.Serialization Namespace


ObjectHeader Properties

ObjectHeader Properties

The SerializerObjectHeader type exposes the following members.

Properties
 | Name | Description
Public property | DataType | [GET] The objects data type.
Public property | IsObjectIdRequired | [GET] Returns whether this kind of object requires an ObjectId to be fully described during serialization.
Public property | IsObjectTypeRequired | [GET] Returns whether this kind of object requires an explicit ObjectType to be fully described described during serialization.
Public property | IsPrimitive | [GET] Whether or not the object is considered a primitive value according to its DataType.
Public property | ObjectId | [GET] The objects unique ID. May be zero for non-referenced object types.
Public property | ObjectType | [GET] The objects resolved type information. May be unavailable / null when loading objects.
Public property | SerializeType | [GET] The objects resolved serialization type information. May be unavailable / null when loading objects.
Public property | TypeString | [GET] The string representing this objects type in the serialized data stream.
Top
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.DataType Property

SerializerObjectHeaderDataType Property
[GET] The objects data type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DataType DataType { get; }

Property Value

Type: DataType
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.IsObjectIdRequired Property

SerializerObjectHeaderIsObjectIdRequired Property
[GET] Returns whether this kind of object requires an ObjectId to be fully described during serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsObjectIdRequired { get; }

Property Value

Type: Boolean
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.IsObjectTypeRequired Property

SerializerObjectHeaderIsObjectTypeRequired Property
[GET] Returns whether this kind of object requires an explicit ObjectType to be fully described described during serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsObjectTypeRequired { get; }

Property Value

Type: Boolean
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.IsPrimitive Property

SerializerObjectHeaderIsPrimitive Property
[GET] Whether or not the object is considered a primitive value according to its DataType.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsPrimitive { get; }

Property Value

Type: Boolean
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.ObjectId Property

SerializerObjectHeaderObjectId Property
[GET] The objects unique ID. May be zero for non-referenced object types.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public uint ObjectId { get; }

Property Value

Type: UInt32
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.ObjectType Property

SerializerObjectHeaderObjectType Property
[GET] The objects resolved type information. May be unavailable / null when loading objects.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeInfo ObjectType { get; }

Property Value

Type: TypeInfo
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.SerializeType Property

SerializerObjectHeaderSerializeType Property
[GET] The objects resolved serialization type information. May be unavailable / null when loading objects.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SerializeType SerializeType { get; }

Property Value

Type: SerializeType
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


Serializer.ObjectHeader.TypeString Property

SerializerObjectHeaderTypeString Property
[GET] The string representing this objects type in the serialized data stream.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string TypeString { get; }

Property Value

Type: String
See Also

Reference

SerializerObjectHeader Class
Duality.Serialization Namespace


SerializeSurrogate(T) Class

SerializeSurrogateT Class
Default base class for Serialization Surrogates. It implements both ISerializeSurrogate and ISerializeExplicit, thus being able to fully perform de/serialization of a designated object type.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeSurrogateT
Duality.Serialization.SurrogatesDictionarySurrogate
Duality.Serialization.SurrogatesGuidArraySurrogate
Duality.Serialization.SurrogatesGuidSurrogate

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract class SerializeSurrogate<T> : ISerializeSurrogate,
    ISerializeExplicit

Type Parameters

T
The base Type of objects this surrogate can replace.

The SerializeSurrogateT type exposes the following members.

Constructors
 | Name | Description
Protected method | SerializeSurrogateT | Initializes a new instance of the SerializeSurrogateT class
Top
Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type.
Public method | ReadData | Reads and applies the object data to the specified IDataReader.
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.
Public method | WriteData | Writes the object data to the specified IDataWriter.
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked.
Protected property | RealObject | [GET] The object that is de/serialized
Top
See Also

Reference

Duality.Serialization Namespace


SerializeSurrogate(T) Constructor

SerializeSurrogateT Constructor
Initializes a new instance of the SerializeSurrogateT class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected SerializeSurrogate()
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T) Methods

SerializeSurrogateT Methods

The SerializeSurrogateT generic type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type.
Public method | ReadData | Reads and applies the object data to the specified IDataReader.
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.
Public method | WriteData | Writes the object data to the specified IDataWriter.
Top
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).ConstructObject Method

SerializeSurrogateTConstructObject Method
Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter).

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual Object ConstructObject(
    IDataReader reader,
    TypeInfo objType
)

Parameters

reader
Type: Duality.SerializationIDataReader
The IDataReader to deserialize constructor data from.
objType
Type: System.ReflectionTypeInfo
The TypeInfo of the object to create.

Return Value

Type: Object
An instance of the specified Type that has been constructed using the provided data.

Implements

ISerializeSurrogateConstructObject(IDataReader, TypeInfo)
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).MatchesType Method

SerializeSurrogateTMatchesType Method
Checks whether this surrogate is able to de/serialize the specified object type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo
The TypeInfo of the object in question.

Return Value

Type: Boolean
True, if this surrogate is able to de/serialize such object, false if not.

Implements

ISerializeSurrogateMatchesType(TypeInfo)
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).ReadData Method

SerializeSurrogateTReadData Method
Reads and applies the object data to the specified IDataReader.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void ReadData(
    IDataReader reader
)

Parameters

reader
Type: Duality.SerializationIDataReader

Implements

ISerializeExplicitReadData(IDataReader)
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).WriteConstructorData Method

SerializeSurrogateTWriteConstructorData Method
Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual void WriteConstructorData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter
The IDataWriter to serialize constructor data to.

Implements

ISerializeSurrogateWriteConstructorData(IDataWriter)
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).WriteData Method

SerializeSurrogateTWriteData Method
Writes the object data to the specified IDataWriter.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public abstract void WriteData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeExplicitWriteData(IDataWriter)
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T) Properties

SerializeSurrogateT Properties

The SerializeSurrogateT generic type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked.
Protected property | RealObject | [GET] The object that is de/serialized
Top
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).Priority Property

SerializeSurrogateTPriority Property
[GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public virtual int Priority { get; }

Property Value

Type: Int32

Implements

ISerializeSurrogatePriority
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeSurrogate(T).RealObject Property

SerializeSurrogateTRealObject Property
[GET] The object that is de/serialized

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected T RealObject { get; }

Property Value

Type: T
See Also

Reference

SerializeSurrogateT Class
Duality.Serialization Namespace


SerializeType Class

SerializeType Class
The SerializeType class is essentially caching serialization-relevant information that has been generated basing on a Type.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeType

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public sealed class SerializeType

The SerializeType type exposes the following members.

Constructors
 | Name | Description
Public method | SerializeType | Creates a new SerializeType based on a Type, gathering all the information that is necessary for serialization.
Top
Properties
 | Name | Description
Public property | CanBeReferenced | [GET] Returns whether object of this Type can be referenced by other serialized objects.
Public property | DataType | [GET] The DataType associated with the described Type.
Public property | DefaultValue | [GET] Returns the default instance for objects of this type. This is a cached instance of GetDefaultOf(TypeInfo).
Public property | Fields | [GET] An array of fields which are serialized.
Public property | IsSerializable | [GET] Returns whether objects of this Type are viable for serialization.
Public property | Type | [GET] The TypeInfo that is described.
Public property | TypeString | [GET] A string referring to the Type that is described.
Top
See Also

Reference

Duality.Serialization Namespace


SerializeType Constructor

SerializeType Constructor
Creates a new SerializeType based on a Type, gathering all the information that is necessary for serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public SerializeType(
    Type t
)

Parameters

t
Type: SystemType
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType Properties

SerializeType Properties

The SerializeType type exposes the following members.

Properties
 | Name | Description
Public property | CanBeReferenced | [GET] Returns whether object of this Type can be referenced by other serialized objects.
Public property | DataType | [GET] The DataType associated with the described Type.
Public property | DefaultValue | [GET] Returns the default instance for objects of this type. This is a cached instance of GetDefaultOf(TypeInfo).
Public property | Fields | [GET] An array of fields which are serialized.
Public property | IsSerializable | [GET] Returns whether objects of this Type are viable for serialization.
Public property | Type | [GET] The TypeInfo that is described.
Public property | TypeString | [GET] A string referring to the Type that is described.
Top
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.CanBeReferenced Property

SerializeTypeCanBeReferenced Property
[GET] Returns whether object of this Type can be referenced by other serialized objects.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool CanBeReferenced { get; }

Property Value

Type: Boolean
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.DataType Property

SerializeTypeDataType Property
[GET] The DataType associated with the described Type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DataType DataType { get; }

Property Value

Type: DataType
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.DefaultValue Property

SerializeTypeDefaultValue Property
[GET] Returns the default instance for objects of this type. This is a cached instance of GetDefaultOf(TypeInfo).

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public Object DefaultValue { get; }

Property Value

Type: Object
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.Fields Property

SerializeTypeFields Property
[GET] An array of fields which are serialized.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FieldInfo[] Fields { get; }

Property Value

Type: FieldInfo
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.IsSerializable Property

SerializeTypeIsSerializable Property
[GET] Returns whether objects of this Type are viable for serialization.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public bool IsSerializable { get; }

Property Value

Type: Boolean
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.Type Property

SerializeTypeType Property
[GET] The TypeInfo that is described.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeInfo Type { get; }

Property Value

Type: TypeInfo
See Also

Reference

SerializeType Class
Duality.Serialization Namespace


SerializeType.TypeString Property

SerializeTypeTypeString Property
[GET] A string referring to the Type that is described.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string TypeString { get; }

Property Value

Type: String
See Also

Reference

SerializeType Class
Duality.Serialization Namespace
ReflectionHelperGetTypeId(Type)


TypeDataLayout Class

TypeDataLayout Class
This class provides information about the data layout when de/serializing an object.
Inheritance Hierarchy
SystemObject
Duality.SerializationTypeDataLayout

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class TypeDataLayout

The TypeDataLayout type exposes the following members.

Constructors
 | Name | Description
Public method | TypeDataLayout(BinaryReader) | Initializes a TypeDataLayout from the specified BinaryReader.
Public method | TypeDataLayout(SerializeType) | Initializes a TypeDataLayout by extracting necessary information from the specified SerializeType.
Public method | TypeDataLayout(TypeDataLayout) | Initializes a TypeDataLayout by cloning an existing TypeDataLayout.
Top
Methods
 | Name | Description
Public method | Write | Writes the TypeDataLayout to the specified BinaryWriter.
Top
Properties
 | Name | Description
Public property | Fields | [GET / SET] An array of all the necessary field information, typically one TypeDataLayoutFieldDataInfo entry per field.
Top
See Also

Reference

Duality.Serialization Namespace
Duality.SerializationBinarySerializer


TypeDataLayout Constructor

TypeDataLayout Constructor
Overload List
 | Name | Description
Public method | TypeDataLayout(BinaryReader) | Initializes a TypeDataLayout from the specified BinaryReader.
Public method | TypeDataLayout(SerializeType) | Initializes a TypeDataLayout by extracting necessary information from the specified SerializeType.
Public method | TypeDataLayout(TypeDataLayout) | Initializes a TypeDataLayout by cloning an existing TypeDataLayout.
Top
See Also

Reference

TypeDataLayout Class
Duality.Serialization Namespace


TypeDataLayout Constructor (BinaryReader)

TypeDataLayout Constructor (BinaryReader)
Initializes a TypeDataLayout from the specified BinaryReader.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeDataLayout(
    BinaryReader r
)

Parameters

r
Type: System.IOBinaryReader
The BinaryReader from which the type information is read.
See Also

Reference

TypeDataLayout Class
TypeDataLayout Overload
Duality.Serialization Namespace


TypeDataLayout Constructor (SerializeType)

TypeDataLayout Constructor (SerializeType)
Initializes a TypeDataLayout by extracting necessary information from the specified SerializeType.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeDataLayout(
    SerializeType t
)

Parameters

t
Type: Duality.SerializationSerializeType
The source SerializeType.
See Also

Reference

TypeDataLayout Class
TypeDataLayout Overload
Duality.Serialization Namespace


TypeDataLayout Constructor (TypeDataLayout)

TypeDataLayout Constructor (TypeDataLayout)
Initializes a TypeDataLayout by cloning an existing TypeDataLayout.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeDataLayout(
    TypeDataLayout t
)

Parameters

t
Type: Duality.SerializationTypeDataLayout
The source layout
See Also

Reference

TypeDataLayout Class
TypeDataLayout Overload
Duality.Serialization Namespace


TypeDataLayout Methods

TypeDataLayout Methods

The TypeDataLayout type exposes the following members.

Methods
 | Name | Description
Public method | Write | Writes the TypeDataLayout to the specified BinaryWriter.
Top
See Also

Reference

TypeDataLayout Class
Duality.Serialization Namespace


TypeDataLayout.Write Method

TypeDataLayoutWrite Method
Writes the TypeDataLayout to the specified BinaryWriter.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public void Write(
    BinaryWriter w
)

Parameters

w
Type: System.IOBinaryWriter
The BinaryWriter to store the type information.
See Also

Reference

TypeDataLayout Class
Duality.Serialization Namespace


TypeDataLayout Properties

TypeDataLayout Properties

The TypeDataLayout type exposes the following members.

Properties
 | Name | Description
Public property | Fields | [GET / SET] An array of all the necessary field information, typically one TypeDataLayoutFieldDataInfo entry per field.
Top
See Also

Reference

TypeDataLayout Class
Duality.Serialization Namespace


TypeDataLayout.Fields Property

TypeDataLayoutFields Property
[GET / SET] An array of all the necessary field information, typically one TypeDataLayoutFieldDataInfo entry per field.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public TypeDataLayoutFieldDataInfo[] Fields { get; set; }

Property Value

Type: TypeDataLayoutFieldDataInfo
See Also

Reference

TypeDataLayout Class
Duality.Serialization Namespace


TypeDataLayout.FieldDataInfo Structure

TypeDataLayoutFieldDataInfo Structure
Holds information about a single field.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public struct FieldDataInfo

The TypeDataLayoutFieldDataInfo type exposes the following members.

Constructors
 | Name | Description
Public method | TypeDataLayoutFieldDataInfo | Initializes a new instance of the TypeDataLayoutFieldDataInfo class
Top
Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
Fields
 | Name | Description
Public field | name | The fields name
Public field | typeString | A string referring to the fields type.
Top
See Also

Reference

Duality.Serialization Namespace


TypeDataLayout.FieldDataInfo Constructor

TypeDataLayoutFieldDataInfo Constructor
Initializes a new instance of the TypeDataLayoutFieldDataInfo class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public FieldDataInfo(
    string name,
    string typeString
)

Parameters

name
Type: SystemString
typeString
Type: SystemString
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


FieldDataInfo Fields

FieldDataInfo Fields

The TypeDataLayoutFieldDataInfo type exposes the following members.

Fields
 | Name | Description
Public field | name | The fields name
Public field | typeString | A string referring to the fields type.
Top
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


TypeDataLayout.FieldDataInfo.name Field

TypeDataLayoutFieldDataInfoname Field
The fields name

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string name

Field Value

Type: String
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


TypeDataLayout.FieldDataInfo.typeString Field

TypeDataLayoutFieldDataInfotypeString Field
A string referring to the fields type.

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public string typeString

Field Value

Type: String
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


FieldDataInfo Methods

FieldDataInfo Methods

The TypeDataLayoutFieldDataInfo type exposes the following members.

Methods
 | Name | Description
Public method | ToString | (Overrides ValueTypeToString.)
Top
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


TypeDataLayout.FieldDataInfo.ToString Method

TypeDataLayoutFieldDataInfoToString Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String
See Also

Reference

TypeDataLayoutFieldDataInfo Structure
Duality.Serialization Namespace


XmlSerializer Class

XmlSerializer Class
De/Serializes objects in an XML format. Additional metadata is included in order to allow an extended degree of error tolerance when working under development conditions.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializer
Duality.SerializationXmlSerializer

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class XmlSerializer : Serializer

The XmlSerializer type exposes the following members.

Constructors
 | Name | Description
Public method | XmlSerializer | Initializes a new instance of the XmlSerializer class
Top
Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker. (Inherited from Serializer.)
Protected method | AssignValueToArray | Assigns the specified value to a specific array index. (Inherited from Serializer.)
Protected method | AssignValueToField | Assigns the specified value to an objects field. (Inherited from Serializer.)
Public method | ClearFieldBlockers | Unregisters all FieldBlockers. (Inherited from Serializer.)
Public method | Dispose | (Inherited from Serializer.)
Protected method | Finalize | (Inherited from Serializer.)
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value. (Inherited from Serializer.)
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization. (Inherited from Serializer.)
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization. (Inherited from Serializer.)
Protected method | MatchesStreamFormat | (Overrides SerializerMatchesStreamFormat(Stream).)
Protected method | OnBeginReadOperation | (Overrides SerializerOnBeginReadOperation.)
Protected method | OnBeginWriteOperation | (Overrides SerializerOnBeginWriteOperation.)
Protected method | OnDisposed | (Inherited from Serializer.)
Protected method | OnEndReadOperation | (Overrides SerializerOnEndReadOperation.)
Protected method | OnEndWriteOperation | (Overrides SerializerOnEndWriteOperation.)
Protected method | OnTargetStreamChanged | Called when the target stream this Serializer operates on has changed. (Inherited from Serializer.)
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information. (Inherited from Serializer.)
Public method | ReadObject | Reads a single object and returns it. (Inherited from Serializer.)
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter. (Inherited from Serializer.)
Protected method | ReadObjectData | (Overrides SerializerReadObjectData.)
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker. (Inherited from Serializer.)
Protected method | ResolveEnumValue | Resolves the specified Enum value. (Inherited from Serializer.)
Protected method | ResolveMember | Resolves the specified Member. (Inherited from Serializer.)
Protected method | ResolveType | Resolves the specified Type. (Inherited from Serializer.)
Public method | WriteObject(Object) | Writes a single object. (Inherited from Serializer.)
Public method | WriteObjectT(T) | Writes a single object. (Inherited from Serializer.)
Protected method | WriteObjectData | (Overrides SerializerWriteObjectData(Object).)
Top
Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log. (Inherited from Serializer.)
Protected field | idManager | Manages object IDs during de/serialization. (Inherited from Serializer.)
Top
Properties
 | Name | Description
Public property | CanRead | [GET] Can this Serializer read data? (Inherited from Serializer.)
Public property | CanWrite | [GET] Can this Serializer write data? (Inherited from Serializer.)
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore. (Inherited from Serializer.)
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead. (Inherited from Serializer.)
Public property | LocalLog | [GET / SET] The local de/serialization Log. (Inherited from Serializer.)
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to). (Inherited from Serializer.)
Top
See Also

Reference

Duality.Serialization Namespace


XmlSerializer Constructor

XmlSerializer Constructor
Initializes a new instance of the XmlSerializer class

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public XmlSerializer()
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer Fields

XmlSerializer Fields

The XmlSerializer type exposes the following members.

Fields
 | Name | Description
Protected field | fieldBlockers | The de/serialization Log. (Inherited from Serializer.)
Protected field | idManager | Manages object IDs during de/serialization. (Inherited from Serializer.)
Top
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer Methods

XmlSerializer Methods

The XmlSerializer type exposes the following members.

Methods
 | Name | Description
Public method | AddFieldBlocker | Registers a new FieldBlocker. (Inherited from Serializer.)
Protected method | AssignValueToArray | Assigns the specified value to a specific array index. (Inherited from Serializer.)
Protected method | AssignValueToField | Assigns the specified value to an objects field. (Inherited from Serializer.)
Public method | ClearFieldBlockers | Unregisters all FieldBlockers. (Inherited from Serializer.)
Public method | Dispose | (Inherited from Serializer.)
Protected method | Finalize | (Inherited from Serializer.)
Public method | IsFieldBlocked | Determines whether a specific field is blocked. Blocked fields, despite being generally flagged as being serializable, are omitted during de/serialization and retain their default value. (Inherited from Serializer.)
Protected method | LogCustomDeserializationError | Logs an error that occurred during custom deserialization. (Inherited from Serializer.)
Protected method | LogCustomSerializationError | Logs an error that occurred during custom serialization. (Inherited from Serializer.)
Protected method | MatchesStreamFormat | (Overrides SerializerMatchesStreamFormat(Stream).)
Protected method | OnBeginReadOperation | (Overrides SerializerOnBeginReadOperation.)
Protected method | OnBeginWriteOperation | (Overrides SerializerOnBeginWriteOperation.)
Protected method | OnDisposed | (Inherited from Serializer.)
Protected method | OnEndReadOperation | (Overrides SerializerOnEndReadOperation.)
Protected method | OnEndWriteOperation | (Overrides SerializerOnEndWriteOperation.)
Protected method | OnTargetStreamChanged | Called when the target stream this Serializer operates on has changed. (Inherited from Serializer.)
Protected method | PrepareWriteObject | Prepares an object for serialization and generates its header information. (Inherited from Serializer.)
Public method | ReadObject | Reads a single object and returns it. (Inherited from Serializer.)
Public method | ReadObjectT(T) | Reads a single object, casts it to the specified Type and returns it via output parameter. (Inherited from Serializer.)
Protected method | ReadObjectData | (Overrides SerializerReadObjectData.)
Public method | RemoveFieldBlocker | Unregisters an existing FieldBlocker. (Inherited from Serializer.)
Protected method | ResolveEnumValue | Resolves the specified Enum value. (Inherited from Serializer.)
Protected method | ResolveMember | Resolves the specified Member. (Inherited from Serializer.)
Protected method | ResolveType | Resolves the specified Type. (Inherited from Serializer.)
Public method | WriteObject(Object) | Writes a single object. (Inherited from Serializer.)
Public method | WriteObjectT(T) | Writes a single object. (Inherited from Serializer.)
Protected method | WriteObjectData | (Overrides SerializerWriteObjectData(Object).)
Top
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.MatchesStreamFormat Method

XmlSerializerMatchesStreamFormat Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override bool MatchesStreamFormat(
    Stream stream
)

Parameters

stream
Type: System.IOStream

Return Value

Type: Boolean
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.OnBeginReadOperation Method

XmlSerializerOnBeginReadOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnBeginReadOperation()
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.OnBeginWriteOperation Method

XmlSerializerOnBeginWriteOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnBeginWriteOperation()
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.OnEndReadOperation Method

XmlSerializerOnEndReadOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnEndReadOperation()
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.OnEndWriteOperation Method

XmlSerializerOnEndWriteOperation Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void OnEndWriteOperation()
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.ReadObjectData Method

XmlSerializerReadObjectData Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override Object ReadObjectData()

Return Value

Type: Object
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer.WriteObjectData Method

XmlSerializerWriteObjectData Method

Namespace: Duality.Serialization
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
protected override void WriteObjectData(
    Object obj
)

Parameters

obj
Type: SystemObject
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


XmlSerializer Properties

XmlSerializer Properties

The XmlSerializer type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | [GET] Can this Serializer read data? (Inherited from Serializer.)
Public property | CanWrite | [GET] Can this Serializer write data? (Inherited from Serializer.)
Public property | Disposed | [GET] Whether this formatter has been disposed. A disposed object cannot be used anymore. (Inherited from Serializer.)
Public property | FieldBlockers | [GET] Enumerates registered field blockers. If any registered field blocker returns true upon serializing a specific field, a default value is assumed instead. (Inherited from Serializer.)
Public property | LocalLog | [GET / SET] The local de/serialization Log. (Inherited from Serializer.)
Public property | TargetStream | [GET / SET] The target Stream this Serializer operates on (i.e. reads from and writes to). (Inherited from Serializer.)
Top
See Also

Reference

XmlSerializer Class
Duality.Serialization Namespace


Duality.Serialization.Surrogates Namespace

Duality.Serialization.Surrogates Namespace
Classes
 | Class | Description
Public class | DictionarySurrogate | De/Serializes a DictionaryTKey, TValue.
Public class | GuidArraySurrogate | De/Serializes an array of Guid objects.
Public class | GuidSurrogate | De/Serializes a Guid.


DictionarySurrogate Class

DictionarySurrogate Class
De/Serializes a DictionaryTKey, TValue.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeSurrogate IDictionary
Duality.Serialization.SurrogatesDictionarySurrogate

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class DictionarySurrogate : SerializeSurrogate<IDictionary>

The DictionarySurrogate type exposes the following members.

Constructors
 | Name | Description
Public method | DictionarySurrogate | Initializes a new instance of the DictionarySurrogate class
Top
Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter). (Inherited from SerializeSurrogateT.)
Public method | MatchesType | (Overrides SerializeSurrogateTMatchesType(TypeInfo).)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage. (Inherited from SerializeSurrogateT.)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

Duality.Serialization.Surrogates Namespace


DictionarySurrogate Constructor

DictionarySurrogate Constructor
Initializes a new instance of the DictionarySurrogate class

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public DictionarySurrogate()
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


DictionarySurrogate Methods

DictionarySurrogate Methods

The DictionarySurrogate type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | Constructs an object in deserialization based on the constructor data that has been written in serialization using WriteConstructorData(IDataWriter). (Inherited from SerializeSurrogateT.)
Public method | MatchesType | (Overrides SerializeSurrogateTMatchesType(TypeInfo).)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | Writes constructor data for the replaced object. This will be used in a deserialization pre-pass for constructing the object. Note that constructor data may not contain any object references to itsself, since it the object doesn't exist yet at this deserialization stage. (Inherited from SerializeSurrogateT.)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


DictionarySurrogate.MatchesType Method

DictionarySurrogateMatchesType Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override bool MatchesType(
    TypeInfo t
)

Parameters

t
Type: System.ReflectionTypeInfo

Return Value

Type: Boolean

Implements

ISerializeSurrogateMatchesType(TypeInfo)
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


DictionarySurrogate.ReadData Method

DictionarySurrogateReadData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void ReadData(
    IDataReader reader
)

Parameters

reader
Type: Duality.SerializationIDataReader

Implements

ISerializeExplicitReadData(IDataReader)
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


DictionarySurrogate.WriteData Method

DictionarySurrogateWriteData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeExplicitWriteData(IDataWriter)
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


DictionarySurrogate Properties

DictionarySurrogate Properties

The DictionarySurrogate type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

DictionarySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate Class

GuidArraySurrogate Class
De/Serializes an array of Guid objects.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeSurrogate Guid
Duality.Serialization.SurrogatesGuidArraySurrogate

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GuidArraySurrogate : SerializeSurrogate<Guid[]>

The GuidArraySurrogate type exposes the following members.

Constructors
 | Name | Description
Public method | GuidArraySurrogate | Initializes a new instance of the GuidArraySurrogate class
Top
Methods
 | Name | Description
Public method | ConstructObject | (Overrides SerializeSurrogateTConstructObject(IDataReader, TypeInfo).)
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type. (Inherited from SerializeSurrogateT.)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | (Overrides SerializeSurrogateTWriteConstructorData(IDataWriter).)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

Duality.Serialization.Surrogates Namespace


GuidArraySurrogate Constructor

GuidArraySurrogate Constructor
Initializes a new instance of the GuidArraySurrogate class

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GuidArraySurrogate()
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate Methods

GuidArraySurrogate Methods

The GuidArraySurrogate type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | (Overrides SerializeSurrogateTConstructObject(IDataReader, TypeInfo).)
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type. (Inherited from SerializeSurrogateT.)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | (Overrides SerializeSurrogateTWriteConstructorData(IDataWriter).)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate.ConstructObject Method

GuidArraySurrogateConstructObject Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Object ConstructObject(
    IDataReader reader,
    TypeInfo objType
)

Parameters

reader
Type: Duality.SerializationIDataReader
objType
Type: System.ReflectionTypeInfo

Return Value

Type: Object

Implements

ISerializeSurrogateConstructObject(IDataReader, TypeInfo)
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate.ReadData Method

GuidArraySurrogateReadData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void ReadData(
    IDataReader reader
)

Parameters

reader
Type: Duality.SerializationIDataReader

Implements

ISerializeExplicitReadData(IDataReader)
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate.WriteConstructorData Method

GuidArraySurrogateWriteConstructorData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteConstructorData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeSurrogateWriteConstructorData(IDataWriter)
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate.WriteData Method

GuidArraySurrogateWriteData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeExplicitWriteData(IDataWriter)
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidArraySurrogate Properties

GuidArraySurrogate Properties

The GuidArraySurrogate type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

GuidArraySurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate Class

GuidSurrogate Class
De/Serializes a Guid.
Inheritance Hierarchy
SystemObject
Duality.SerializationSerializeSurrogate Guid
Duality.Serialization.SurrogatesGuidSurrogate

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public class GuidSurrogate : SerializeSurrogate<Guid>

The GuidSurrogate type exposes the following members.

Constructors
 | Name | Description
Public method | GuidSurrogate | Initializes a new instance of the GuidSurrogate class
Top
Methods
 | Name | Description
Public method | ConstructObject | (Overrides SerializeSurrogateTConstructObject(IDataReader, TypeInfo).)
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type. (Inherited from SerializeSurrogateT.)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | (Overrides SerializeSurrogateTWriteConstructorData(IDataWriter).)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

Duality.Serialization.Surrogates Namespace


GuidSurrogate Constructor

GuidSurrogate Constructor
Initializes a new instance of the GuidSurrogate class

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public GuidSurrogate()
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate Methods

GuidSurrogate Methods

The GuidSurrogate type exposes the following members.

Methods
 | Name | Description
Public method | ConstructObject | (Overrides SerializeSurrogateTConstructObject(IDataReader, TypeInfo).)
Public method | MatchesType | Checks whether this surrogate is able to de/serialize the specified object type. (Inherited from SerializeSurrogateT.)
Public method | ReadData | (Overrides SerializeSurrogateTReadData(IDataReader).)
Public method | WriteConstructorData | (Overrides SerializeSurrogateTWriteConstructorData(IDataWriter).)
Public method | WriteData | (Overrides SerializeSurrogateTWriteData(IDataWriter).)
Top
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate.ConstructObject Method

GuidSurrogateConstructObject Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override Object ConstructObject(
    IDataReader reader,
    TypeInfo objType
)

Parameters

reader
Type: Duality.SerializationIDataReader
objType
Type: System.ReflectionTypeInfo

Return Value

Type: Object

Implements

ISerializeSurrogateConstructObject(IDataReader, TypeInfo)
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate.ReadData Method

GuidSurrogateReadData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void ReadData(
    IDataReader reader
)

Parameters

reader
Type: Duality.SerializationIDataReader

Implements

ISerializeExplicitReadData(IDataReader)
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate.WriteConstructorData Method

GuidSurrogateWriteConstructorData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteConstructorData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeSurrogateWriteConstructorData(IDataWriter)
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate.WriteData Method

GuidSurrogateWriteData Method

Namespace: Duality.Serialization.Surrogates
Assembly: Duality (in Duality.dll) Version: 2.8.3.0
Syntax
C#
Copy
public override void WriteData(
    IDataWriter writer
)

Parameters

writer
Type: Duality.SerializationIDataWriter

Implements

ISerializeExplicitWriteData(IDataWriter)
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace


GuidSurrogate Properties

GuidSurrogate Properties

The GuidSurrogate type exposes the following members.

Properties
 | Name | Description
Public property | Priority | [GET] If more than one registered surrogate is capable of de/serializing a given object type, the one with the highest priority is picked. (Inherited from SerializeSurrogateT.)
Protected property | RealObject | [GET] The object that is de/serialized (Inherited from SerializeSurrogateT.)
Top
See Also

Reference

GuidSurrogate Class
Duality.Serialization.Surrogates Namespace