Value

Inheritance diagram of rumba.Value
class Value

Bases: pybind11_builtins.pybind11_object

Base class of all Rumba values.

Constructors

__init__ Value(: bool) -> None

Methods

as_Box3f() Returns the value as a Box3f.
as_Color4f() Returns the value as a Color4f.
as_M44f() Returns the value as a M44f.
as_Quatf() Returns the value as a Quatf.
as_V2f() Returns the value as a V2f.
as_V2i() Returns the value as a V2i.
as_V3f() Returns the value as a V3f.
as_V3i() Returns the value as a V3i.
as_V4f() Returns the value as a V4f.
as_V4i() Returns the value as a V4i.
as_bool() Returns the value as a bool.
as_float() Returns the value as a float.
as_int() Returns the value as an integer.
as_string() Returns the value as a string.
duplicate() Duplicate the value.
is_instance(value_type_name) Check if this type derives from another value type.
type_name() Return the type name of the Value.
__init__()

Value(: bool) -> None

Create a boolean value.

:type : bool

Value(: int) -> None

Create an integer value.

:type : int

Value(: float) -> None

Create a float value.

:type : float

Value(string: unicode) -> None

Create a string value.

Value(string: unicode) -> None

Create a string value.

Value(: Imath.V2f) -> None

Create a Imath::V2f value.

:type : Imath.V2f

Value(: Imath.V3f) -> None

Create a Imath::V3f value.

:type : Imath.V3f

Value(: Imath.V4f) -> None

Create a Imath::V4f value.

:type : Imath.V4f

Value(: Imath.V2i) -> None

Create a Imath::V2i value.

:type : Imath.V2i

Value(: Imath.V3i) -> None

Create a Imath::V3i value.

:type : Imath.V3i

Value(: Imath.V4i) -> None

Create a Imath::V4i value.

:type : Imath.V4i

Value(: Imath.Color4f) -> None

Create a Imath::Color4f value.

:type : Imath.Color4f

Value(: Imath.M44f) -> None

Create a Imath::M44f value.

:type : Imath.M44f

Value(: Imath.Box3f) -> None

Create a Imath::Box3f value.

:type : Imath.Box3f

Value(: Imath.Quatf) -> None

Create a Imath::Quatf value.

:type : Imath.Quatf

Value() -> None

as_Box3f() → Imath.Box3f

Returns the value as a Box3f.

You must be sure this value is a Box3f or you will have an empty box.

Return type:Imath.Box3f
as_Color4f() → Imath.Color4f

Returns the value as a Color4f.

You must be sure this value is a Color4f or you will have {0,0,0,0}.

Return type:Imath.Color4f
as_M44f() → Imath.M44f

Returns the value as a M44f.

You must be sure this value is a M44f or you will have an identity matrix.

Return type:Imath.M44f
as_Quatf() → Imath.Quatf

Returns the value as a Quatf.

You must be sure this value is a Quatf or you will have an identity quaternion.

Return type:Imath.Quatf
as_V2f() → Imath.V2f

Returns the value as a V2f.

You must be sure this value is a V2f or you will have {0,0}.

Return type:Imath.V2f
as_V2i() → Imath.V2i

Returns the value as a V2i.

You must be sure this value is a V2i or you will have {0,0}.

Return type:Imath.V2i
as_V3f() → Imath.V3f

Returns the value as a V3f.

You must be sure this value is a V3f or you will have {0,0,0}.

Return type:Imath.V3f
as_V3i() → Imath.V3i

Returns the value as a V3i.

You must be sure this value is a V3i or you will have {0,0,0}.

Return type:Imath.V3i
as_V4f() → Imath.V4f

Returns the value as a V4f.

You must be sure this value is a V4f or you will have {0,0,0,0}.

Return type:Imath.V4f
as_V4i() → Imath.V4i

Returns the value as a V4i.

You must be sure this value is a V4i or you will have {0,0,0,0}.

Return type:Imath.V4i
as_bool() → bool

Returns the value as a bool.

You must be sure this value is an integer, a float or a boolean or you get false.

Return type:bool
as_float() → float

Returns the value as a float.

You must be sure this value is an integer, a float or a boolean or you get 0.f.

Return type:float
as_int() → int

Returns the value as an integer.

You must be sure this value is an integer, a float or a boolean or you get 0.

Return type:int
as_string() → unicode

Returns the value as a string.

You must be sure this value is a string or you will have an empty string.

Return type:unicode
duplicate() → Value

Duplicate the value.

In most cases, the duplication is a light process, i-e, the internal buffers are shared and copied-on-write

Return type:Value
is_instance(value_type_name: unicode) → bool

Check if this type derives from another value type.

Return type:bool
type_name() → unicode

Return the type name of the Value.

For basic types names are : “Int”, “Bool”, “Float”, “String”, “V2f”, “V3f”, “V4f”, “V2i”, “V3i”, “V4i”, “M44f”, “Box3f”, “Color4f”, “Quat4f”

Return type:unicode