EntityAttributes
- class carb.audio.EntityAttributes
Bases:
pybind11_object
Base spatial attributes of the entity. This includes its position, orientation, and velocity and an optional cone.
Methods
__init__
(self)Attributes
Defines an optional sound cone for an entity.
A set of flags that indicate which of members of this struct are valid.
A vector indicating the direction the listener is currently facing.
The current position of the listener in world units.
A vector indicating the upward direction for the listener.
The current velocity of the listener in world units per second.
- __init__(self: carb.audio._audio.EntityAttributes) None
- property cone
Defines an optional sound cone for an entity. The cone is a segment of a sphere around the entity’s position opening up toward its front vector. The cone is defined by an inner and outer angle, and several DSP values to be interpolated between for those two endpoint angles. This cone is valid if the @ref `ENTITY_FLAG_CONE` flag is set in `flags`.
- property flags
A set of flags that indicate which of members of this struct are valid. This may be `ENTITY_FLAG_ALL` to indicate that all members contain valid data.
- property forward
A vector indicating the direction the listener is currently facing. This does not need to be normalized, but should be for simplicity. If the `ENTITY_FLAG_NORMALIZE` flag is set in `flags`, this vector will be normalized internally before being used. This vector should be perpendicular to the `up` vector unless the `ENTITY_FLAG_MAKE_PERP` flag is set in `flags`. This must not be a zero vector unless the `ENTITY_FLAG_FORWARD` flag is not set in `flags`.
- property position
The current position of the listener in world units. This should only be expressed in meters if the world units scale is set to 1.0 for this context. This value is ignored if the `ENTITY_FLAG_POSITION` flag is not set in `flags`.
- property up
A vector indicating the upward direction for the listener. This does not need to be normalized, but should be for simplicity. If the `ENTITY_FLAG_NORMALIZE` flag is set in `flags`, this vector will be normalized internally before being used. This vector should be perpendicular to the `forward` vector unless the `ENTITY_FLAG_MAKE_PERP` flag is set in `flags`. This must not be a zero vector unless the `ENTITY_FLAG_UP` flag is not set in `flags`.
- property velocity
The current velocity of the listener in world units per second. This should only be expressed in meters per second if the world units scale is set to 1.0 with for the context. The magnitude of this vector will be taken as the listener’s current speed and the vector’s direction will indicate the listener’s current direction. This vector should not be normalized unless the listener’s speed is actually 1.0 units per second. This may be a zero vector if the listener is not moving. This value is ignored if the `ENTITY_FLAG_VELOCITY` flag is not set in `flags`. This vector will not be modified in any way before use.