Instance Handle

class huira.visible8.InstanceHandle
__init__(*args, **kwargs)
get_parent(self: huira._huira.visible8.InstanceHandle) → huira::NodeHandle<huira::SpectralBins<8ul, 380, 750>, huira::Node<huira::SpectralBins<8ul, 380, 750> > >
get_spice_frame(self: huira._huira.visible8.InstanceHandle) → str
get_spice_origin(self: huira._huira.visible8.InstanceHandle) → str
get_static_angular_velocity(self: huira._huira.visible8.InstanceHandle) → huira._huira.Vec3
get_static_position(self: huira._huira.visible8.InstanceHandle) → huira._huira.Vec3
get_static_rotation(self: huira._huira.visible8.InstanceHandle) → huira._huira.Rotation
get_static_scale(self: huira._huira.visible8.InstanceHandle) → huira._huira.Vec3
get_static_velocity(self: huira._huira.visible8.InstanceHandle) → huira._huira.Vec3
id(self: huira._huira.visible8.InstanceHandle) → int
is_effectively_visible(self: huira._huira.visible8.InstanceHandle) → bool

True only when this node and every one of its ancestors are visible

is_indirect_source(self: huira._huira.visible8.InstanceHandle) → bool

Whether this instance is designated as an indirect illumination source

is_visible(self: huira._huira.visible8.InstanceHandle) → bool

This node’s own flag, which ignores whether an ancestor is hidden

look_at(*args, **kwargs)

Overloaded function.

  1. look_at(self: huira._huira.visible8.InstanceHandle, target: huira._huira.visible8.InstanceHandle, up: huira._huira.Vec3 = dvec3(0.000000, 0.000000, 1.000000), observation_mode: Optional[huira._huira.ObservationMode] = None) -> None

Look at another instance, following it through the exposure. It is aimed at where it is seen in the given observation mode, or by default (None) in the scene view’s, which keeps it where the scene view renders it.

  1. look_at(self: huira._huira.visible8.InstanceHandle, target_position: huira._huira.Vec3, up: huira._huira.Vec3 = dvec3(0.000000, 0.000000, 1.000000), frame: huira._huira.TargetFrame = <TargetFrame.PARENT: 0>, observation_mode: Optional[huira._huira.ObservationMode] = <ObservationMode.TRUE_STATE: 0>) -> None

Look at a fixed point, in meters: in the parent’s frame (TargetFrame.PARENT, the default), so that it moves with the parent, or in the scene’s root frame (TargetFrame.ROOT). It is aimed at where it is (TRUE_STATE, the default), shifted by the aberration of the instance’s velocity (ABERRATED_STATE), or, given None, as the scene view observes.

name(self: huira._huira.visible8.InstanceHandle) → str
set_angular_velocity(self: huira._huira.visible8.InstanceHandle, wx: object, wy: object, wz: object) → None

Set the angular velocity expressed in the PARENT frame’s axes (accepts any angular velocity unit). The orientation evolves as q(t) = delta(t) * q_0; this is only an ‘inertial’ rate if every ancestor of the node is static. To command rates about the node’s own axes (e.g. a roll about a camera boresight), use set_body_angular_velocity() instead.

set_body_angular_velocity(self: huira._huira.visible8.InstanceHandle, wx: object, wy: object, wz: object) → None

Set the angular velocity expressed in the node’s own BODY frame axes (accepts any angular velocity unit). The orientation evolves as q(t) = q_0 * delta(t). For a camera (OpenCV convention, +z = boresight), a pure wz produces a roll about the boresight regardless of the camera’s orientation relative to its parent. To command rates in the parent frame’s axes, use set_angular_velocity() instead.

set_euler_angles(self: huira._huira.visible8.InstanceHandle, x: object, y: object, z: object, sequence: str = 'XYZ') → None
set_indirect_source(self: huira._huira.visible8.InstanceHandle, enabled: bool = True) → None

Designate this instance as an indirect illumination source

set_keplerian_orbit(self: huira._huira.visible8.InstanceHandle, semi_major_axis: object, eccentricity: float, inclination: object, raan: object, arg_periapsis: object, mean_anomaly: object, epoch: huira._huira.Time, mu: object) → None

Move the node on a Keplerian orbit about its parent.

semi_major_axis: a distance, positive for an ellipse and negative for a hyperbola. inclination, raan, arg_periapsis, mean_anomaly: angles, in any angle unit. epoch: when the body is at mean_anomaly. mu: the central body’s standard gravitational parameter, GM, as a CubicKilometersPerSecondSquared or CubicMetersPerSecondSquared (the Earth’s is CubicKilometersPerSecondSquared(398600.4418)). Any other position source the node had is replaced.

set_position(self: huira._huira.visible8.InstanceHandle, x: object, y: object, z: object) → None

Set position (accepts any distance unit)

set_position_function(self: huira._huira.visible8.InstanceHandle, function: Callable) → None

Place the node by a function of time.

The function is called with a PoseContext, whose time is when the position is wanted, and returns the node’s position in its parent’s frame, in meters (a Vec3, or three numbers), or a position and a velocity, in meters per second. A velocity it does not return is estimated from positions 2 ms apart.

It is called many times while a SceneView is built, at times in any order (temporal samples, light time, and estimates of velocity), and never while a render runs. It must give the same answer for the same context. Any other position source the node had is replaced.

set_position_table(self: huira._huira.visible8.InstanceHandle, times: list[huira._huira.Time], positions: numpy.ndarray[numpy.float64], velocities: numpy.ndarray[numpy.float64] | None = None) → None

Place the node by a table of times and positions.

times: a list of Time, at least two, each later than the one before. positions: an array of shape (N, 3), in meters, in the parent’s frame. velocities: an array of shape (N, 3), in meters per second, or None to estimate them from the positions.

Between two entries, the position follows the cubic through both that has their velocities there. Velocities not given are estimated at each entry from the quadratic through it and its neighbors. A time outside the table is an error. Any other position source the node had is replaced.

set_rotation(self: huira._huira.visible8.InstanceHandle, rotation: huira._huira.Rotation) → None
set_rotation_function(self: huira._huira.visible8.InstanceHandle, function: Callable) → None

Orient the node by a function of time.

The function is called with a PoseContext, whose time is when the rotation is wanted, and returns the node’s Rotation relative to its parent, or a Rotation and an angular velocity, in radians per second about the parent’s axes. An angular velocity it does not return is estimated from rotations 2 ms apart.

As for set_position_function, it is called many times while a SceneView is built, and must give the same answer for the same context. Any other rotation source the node had is replaced.

set_rotation_local_to_parent(*args, **kwargs)

Overloaded function.

  1. set_rotation_local_to_parent(self: huira._huira.visible8.InstanceHandle, matrix: huira._huira.Mat3) -> None

  2. set_rotation_local_to_parent(self: huira._huira.visible8.InstanceHandle, quaternion: huira._huira.Quaternion) -> None

  3. set_rotation_local_to_parent(self: huira._huira.visible8.InstanceHandle, axis: huira._huira.Vec3, angle: object) -> None

set_rotation_parent_to_local(*args, **kwargs)

Overloaded function.

  1. set_rotation_parent_to_local(self: huira._huira.visible8.InstanceHandle, matrix: huira._huira.Mat3) -> None

  2. set_rotation_parent_to_local(self: huira._huira.visible8.InstanceHandle, quaternion: huira._huira.Quaternion) -> None

  3. set_rotation_parent_to_local(self: huira._huira.visible8.InstanceHandle, axis: huira._huira.Vec3, angle: object) -> None

set_rotation_table(self: huira._huira.visible8.InstanceHandle, times: list[huira._huira.Time], rotations: list[huira._huira.Rotation], angular_velocities: numpy.ndarray[numpy.float64] | None = None) → None

Orient the node by a table of times and rotations.

times: a list of Time, at least two, each later than the one before. rotations: a list of Rotation, relative to the parent. angular_velocities: an array of shape (N, 3), in radians per second about the parent’s axes, or None to take the steady rate between entries.

Between two entries, the rotation turns at a steady rate about a fixed axis, the shorter way round, as in a SPICE type 3 C-kernel; angular velocities given are interpolated linearly. A time outside the table is an error. Any other rotation source the node had is replaced.

set_scale(*args, **kwargs)

Overloaded function.

  1. set_scale(self: huira._huira.visible8.InstanceHandle, sx: float, sy: float, sz: float) -> None

  2. set_scale(self: huira._huira.visible8.InstanceHandle, s: float) -> None

set_spice(self: huira._huira.visible8.InstanceHandle, spice_origin: str, spice_frame: str) → None
set_spice_frame(self: huira._huira.visible8.InstanceHandle, spice_frame: str) → None
set_spice_origin(self: huira._huira.visible8.InstanceHandle, spice_origin: str) → None
set_velocity(self: huira._huira.visible8.InstanceHandle, vx: object, vy: object, vz: object) → None

Set velocity (accepts any velocity unit)

set_visible(self: huira._huira.visible8.InstanceHandle, visible: bool = True) → None

Set whether this node is collected into a SceneView.

Read when a SceneView is constructed, so a SceneView that already exists is unaffected; build a new one to render the change. Descendants are skipped along with this node but keep their own flags, so showing it again restores whatever each descendant was individually set to. Hiding a light removes its illumination as well as its appearance.

type(self: huira._huira.visible8.InstanceHandle) → str
valid(self: huira._huira.visible8.InstanceHandle) → bool