455c06ecd4
Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
231 lines
6.1 KiB
XML
231 lines
6.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="Vector4" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
</brief_description>
|
|
<description>
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<constructors>
|
|
<constructor name="Vector4">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</constructor>
|
|
<constructor name="Vector4">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="from" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</constructor>
|
|
<constructor name="Vector4">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="from" type="Vector4i" />
|
|
<description>
|
|
</description>
|
|
</constructor>
|
|
<constructor name="Vector4">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="x" type="float" />
|
|
<argument index="1" name="y" type="float" />
|
|
<argument index="2" name="z" type="float" />
|
|
<argument index="3" name="w" type="float" />
|
|
<description>
|
|
</description>
|
|
</constructor>
|
|
</constructors>
|
|
<methods>
|
|
<method name="abs" qualifiers="const">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="clamp" qualifiers="const">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="min" type="Vector4" />
|
|
<argument index="1" name="max" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="dot" qualifiers="const">
|
|
<return type="float" />
|
|
<argument index="0" name="with" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="inverse" qualifiers="const">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="is_equal_approx" qualifiers="const">
|
|
<return type="bool" />
|
|
<argument index="0" name="with" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="is_normalized" qualifiers="const">
|
|
<return type="bool" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="length" qualifiers="const">
|
|
<return type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="length_squared" qualifiers="const">
|
|
<return type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="max_axis_index" qualifiers="const">
|
|
<return type="int" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="min_axis_index" qualifiers="const">
|
|
<return type="int" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="normalized" qualifiers="const">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="sign" qualifiers="const">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="w" type="float" setter="" getter="" default="0.0">
|
|
</member>
|
|
<member name="x" type="float" setter="" getter="" default="0.0">
|
|
</member>
|
|
<member name="y" type="float" setter="" getter="" default="0.0">
|
|
</member>
|
|
<member name="z" type="float" setter="" getter="" default="0.0">
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
<constant name="AXIS_X" value="0">
|
|
</constant>
|
|
<constant name="AXIS_Y" value="1">
|
|
</constant>
|
|
<constant name="AXIS_Z" value="2">
|
|
</constant>
|
|
<constant name="AXIS_W" value="3">
|
|
</constant>
|
|
<constant name="ZERO" value="Vector4(0, 0, 0)">
|
|
</constant>
|
|
<constant name="ONE" value="Vector4(1, 1, 1)">
|
|
</constant>
|
|
<constant name="INF" value="Vector4(inf, inf, inf)">
|
|
</constant>
|
|
</constants>
|
|
<operators>
|
|
<operator name="operator !=">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator *">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="Projection" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator *">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator *">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="float" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator *">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="int" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator +">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator -">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator /">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator /">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="float" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator /">
|
|
<return type="Vector4" />
|
|
<argument index="0" name="right" type="int" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator <">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator <=">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator ==">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator >">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator >=">
|
|
<return type="bool" />
|
|
<argument index="0" name="right" type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator unary+">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
<operator name="operator unary-">
|
|
<return type="Vector4" />
|
|
<description>
|
|
</description>
|
|
</operator>
|
|
</operators>
|
|
</class>
|