Added inverse_transform and fixes for Transform
inverse_transform from #7999 highlighted in-place character
This commit is contained in:
parent
e9d9a1cd36
commit
cdb2664350
|
@ -2794,14 +2794,18 @@ Describes a rotation for an object according to Unreal Engine's axis system.
|
||||||
- **Parameters:**
|
- **Parameters:**
|
||||||
- `location` (_[carla.Location](#carla.Location)_)
|
- `location` (_[carla.Location](#carla.Location)_)
|
||||||
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
|
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
|
||||||
|
- <a name="carla.Transform.inverse_transform"></a>**<font color="#7fb800">inverse_transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||||
|
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
|
||||||
|
- **Parameters:**
|
||||||
|
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the inverse transformation will be applied.
|
||||||
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||||
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
|
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
|
||||||
- **Parameters:**
|
- **Parameters:**
|
||||||
- `in_point` (_[carla.Location](#carla.Location)_) - Location in the space to which the transformation will be applied.
|
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the transformation will be applied.
|
||||||
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_vector**</font>)
|
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
|
||||||
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||||
- **Parameters:**
|
- **Parameters:**
|
||||||
- `in_vector` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
|
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
|
||||||
|
|
||||||
##### Getters
|
##### Getters
|
||||||
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
|
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||||
|
|
|
@ -438,20 +438,29 @@
|
||||||
- def_name: transform
|
- def_name: transform
|
||||||
params:
|
params:
|
||||||
- param_name: in_point
|
- param_name: in_point
|
||||||
type: carla.Location
|
type: carla.Vector3D
|
||||||
doc: >
|
doc: >
|
||||||
Location in the space to which the transformation will be applied.
|
Location in the space to which the transformation will be applied.
|
||||||
doc: >
|
doc: >
|
||||||
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
|
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
|
||||||
|
# --------------------------------------
|
||||||
|
- def_name: inverse_transform
|
||||||
|
params:
|
||||||
|
- param_name: in_point
|
||||||
|
type: carla.Vector3D
|
||||||
|
doc: >
|
||||||
|
Location in the space to which the inverse transformation will be applied.
|
||||||
|
doc: >
|
||||||
|
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
- def_name: transform_vector
|
- def_name: transform_vector
|
||||||
params:
|
params:
|
||||||
- param_name: in_vector
|
- param_name: in_point
|
||||||
type: carla.Vector3D
|
type: carla.Vector3D
|
||||||
doc: >
|
doc: >
|
||||||
Vector to which the transformation will be applied.
|
Vector to which the transformation will be applied.
|
||||||
doc: >
|
doc: >
|
||||||
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
- def_name: get_forward_vector
|
- def_name: get_forward_vector
|
||||||
return: carla.Vector3D
|
return: carla.Vector3D
|
||||||
|
|
Loading…
Reference in New Issue