This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Art Samples
Tutorials

Geometry Functions.

Notice
The functions listed below are the members of the Unigine.MathLib namespace.

Geometry Class

Members


void OrthoBasis ( vec3 v, vec3 tangent, vec3 binormal ) #

Arguments

  • vec3 v
  • vec3 tangent - Tangent vector coordinates.
  • vec3 binormal - Binormal vector coordinates.

void OrthoBasis ( dvec3 v, dvec3 tangent, dvec3 binormal ) #

Arguments

  • dvec3 v
  • dvec3 tangent - Tangent vector coordinates.
  • dvec3 binormal - Binormal vector coordinates.

void OrthoTransform ( vec3 v, mat4 transform ) #

Arguments

  • vec3 v
  • mat4 transform - Transformation matrix (mat4) to be set.

void OrthoTransform ( dvec3 v, dmat4 transform ) #

Arguments

  • dvec3 v
  • dmat4 transform - Transformation matrix (dmat4) to be set.

quat OrthoTangent ( vec4 t, vec3 n ) #

Arguments

  • vec4 t - Interpolation coefficient used to interpolate a value between a and b(componentwise).
  • vec3 n

Return value

Return value.

quat OrthoTangent ( vec3 t, vec3 b, vec3 n ) #

Arguments

  • vec3 t - Interpolation coefficient used to interpolate a value between a and b(componentwise).
  • vec3 b
  • vec3 n

Return value

Return value.

float TriangleArea ( vec3 v0, vec3 v1, vec3 v2 ) #

Arguments

Return value

Resulting float value.

double TriangleArea ( dvec3 v0, dvec3 v1, dvec3 v2 ) #

Arguments

Return value

Resulting double value.

vec3 TriangleNormal ( vec3 v0, vec3 v1, vec3 v2 ) #

Arguments

Return value

Return value.

dvec3 TriangleNormal ( dvec3 v0, dvec3 v1, dvec3 v2 ) #

Arguments

Return value

Return value.

vec4 TrianglePlane ( vec3 v0, vec3 v1, vec3 v2 ) #

Arguments

Return value

Return value.

dvec4 TrianglePlane ( dvec3 v0, dvec3 v1, dvec3 v2 ) #

Arguments

Return value

Return value.

vec4 TriangleTangent ( vec3 v0, vec3 v1, vec3 v2 ) #

Arguments

Return value

Return value.

vec4 TriangleTangent ( vec3 v0, vec3 v1, vec3 v2, vec2 t0, vec2 t1, vec2 t2, vec3 normal ) #

Arguments

Return value

Return value.

vec4 TriangleTangent ( vec3 v0, vec3 v1, vec3 v2, vec2 t0, vec2 t1, vec2 t2 ) #

Arguments

Return value

Return value.

dvec4 PolygonPlane ( dvec3[] vertex, int[] indices ) #

Arguments

  • dvec3[] vertex
  • int[] indices

Return value

Return value.

vec4 PolygonPlane ( vec3[] vertex, int[] indices ) #

Arguments

  • vec3[] vertex
  • int[] indices

Return value

Return value.

bool PointTriangleInside ( vec3 point, vec3 v0, vec3 v1, vec3 v2 ) #

Checks if a point is inside a triangle.

Arguments

Return value

Return value.

bool PointTriangleInside ( dvec3 point, dvec3 v0, dvec3 v1, dvec3 v2 ) #

Checks if a point is inside a triangle.

Arguments

Return value

Return value.

bool PointTriangleInside ( vec3 point, vec3 v0, vec3 v1, vec3 v2, vec3 normal ) #

Checks if a point is inside a triangle.

Arguments

Return value

Return value.

bool PointTriangleInside ( dvec3 point, dvec3 v0, dvec3 v1, dvec3 v2, dvec3 normal ) #

Checks if a point is inside a triangle.

Arguments

Return value

Return value.

float PointTriangleDistance ( vec3 point, vec3 v0, vec3 v1, vec3 v2, vec4 plane ) #

Arguments

Return value

Resulting float value.

double PointTriangleDistance ( dvec3 point, dvec3 v0, dvec3 v1, dvec3 v2, dvec4 plane ) #

Arguments

Return value

Resulting double value.

void PointTriangleCoordinates ( vec2 point, vec2 v0, vec2 v1, vec2 v2, float a, float b ) #

Arguments

void PointTriangleCoordinates ( vec3 point, vec3 v0, vec3 v1, vec3 v2, float a, float b ) #

Arguments

void PointTriangleCoordinates ( dvec3 point, dvec3 v0, dvec3 v1, dvec3 v2, double a, double b ) #

Arguments

float PointPolygonDistance ( vec3 point, vec3[] vertex, int[] indices, vec4 plane ) #

Arguments

Return value

Resulting float value.

double PointPolygonDistance ( dvec3 point, dvec3[] vertex, int[] indices, dvec4 plane ) #

Arguments

Return value

Resulting double value.

bool RayBoundBoxIntersection ( vec3 point, vec3 direction, vec3 min, vec3 max ) #

Arguments

  • vec3 point
  • vec3 direction - Direction vector coordinates.
  • vec3 min - Minimum value (lower limit).
  • vec3 max - Maximum value (upper limit).

Return value

Return value.

bool RayBoundBoxIntersection ( dvec3 point, dvec3 direction, dvec3 min, dvec3 max ) #

Arguments

  • dvec3 point
  • dvec3 direction - Direction vector coordinates.
  • dvec3 min - Minimum value (lower limit).
  • dvec3 max - Maximum value (upper limit).

Return value

Return value.

bool IRayBoundBoxIntersection ( vec3 point, vec3 idirection, vec3 min, vec3 max ) #

Arguments

  • vec3 point
  • vec3 idirection
  • vec3 min - Minimum value (lower limit).
  • vec3 max - Maximum value (upper limit).

Return value

Return value.

bool IRayBoundBoxIntersection ( dvec3 point, dvec3 idirection, dvec3 min, dvec3 max ) #

Arguments

  • dvec3 point
  • dvec3 idirection
  • dvec3 min - Minimum value (lower limit).
  • dvec3 max - Maximum value (upper limit).

Return value

Return value.

bool RayTriangleIntersection ( vec3 point, vec3 direction, vec3 v0, vec3 v1, vec3 v2 ) #

Arguments

Return value

Return value.

bool RayTriangleIntersection ( dvec3 point, dvec3 direction, dvec3 v0, dvec3 v1, dvec3 v2 ) #

Arguments

Return value

Return value.

bool LinePlaneIntersection ( vec3 p0, vec3 p1, vec4 plane ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( dvec3 p0, dvec3 p1, dvec4 plane ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( vec3 p0, vec3 p1, vec3 plane_point, vec3 plane_normal ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( dvec3 p0, dvec3 p1, dvec3 plane_point, dvec3 plane_normal ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( vec3 p0, vec3 p1, vec4 plane, vec3 ret ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( dvec3 p0, dvec3 p1, dvec4 plane, dvec3 ret ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( vec3 p0, vec3 p1, vec3 plane_point, vec3 plane_normal, vec3 ret ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool LinePlaneIntersection ( dvec3 p0, dvec3 p1, dvec3 plane_point, dvec3 plane_normal, dvec3 ret ) #

Checks if there is an intersection between a line and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( vec3 point, vec3 direction, vec4 plane ) #

Checks if there is an intersection between a ray and a plane.

Arguments

  • vec3 point
  • vec3 direction - Direction vector coordinates.
  • vec4 plane

Return value

Return value.

bool RayPlaneIntersection ( dvec3 point, dvec3 direction, dvec4 plane ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( vec3 point, vec3 direction, vec3 plane_point, vec3 plane_normal ) #

Checks if there is an intersection between a ray and a plane.

Arguments

  • vec3 point
  • vec3 direction - Direction vector coordinates.
  • vec3 plane_point
  • vec3 plane_normal

Return value

Return value.

bool RayPlaneIntersection ( dvec3 point, dvec3 direction, dvec3 plane_point, dvec3 plane_normal ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( vec3 point, vec3 direction, vec4 plane, vec3 ret ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( dvec3 point, dvec3 direction, dvec4 plane, dvec3 ret ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( vec3 point, vec3 direction, vec3 plane_point, vec3 plane_normal, vec3 ret ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool RayPlaneIntersection ( dvec3 point, dvec3 direction, dvec3 plane_point, dvec3 plane_normal, dvec3 ret ) #

Checks if there is an intersection between a ray and a plane.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( vec3 p0, vec3 p1, vec4 plane ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( dvec3 p0, dvec3 p1, dvec4 plane ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( vec3 p0, vec3 p1, vec3 plane_point, vec3 plane_normal ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( dvec3 p0, dvec3 p1, dvec3 plane_point, dvec3 plane_normal ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( vec3 p0, vec3 p1, vec4 plane, vec3 ret ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( dvec3 p0, dvec3 p1, dvec4 plane, dvec3 ret ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( vec3 p0, vec3 p1, vec3 plane_point, vec3 plane_normal, vec3 ret ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

bool SegmentPlaneIntersection ( dvec3 p0, dvec3 p1, dvec3 plane_point, dvec3 plane_normal, dvec3 ret ) #

Calculates the intersection of a segment and a plane. If the function returns 1, the point of intersection will be put to the return vector.

Arguments

Return value

Return value.

vec3 GetClosestPointOnLine ( vec3 point, vec3 p0, vec3 p1 ) #

Arguments

Return value

Return value.

dvec3 GetClosestPointOnLine ( dvec3 point, dvec3 p0, dvec3 p1 ) #

Arguments

Return value

Return value.

bool GetClosestPointOnTriangle ( vec3 point, vec3 v0, vec3 v1, vec3 v2, vec3 ret ) #

Arguments

Return value

Return value.

bool GetClosestPointOnTriangle ( dvec3 point, dvec3 v0, dvec3 v1, dvec3 v2, dvec3 ret ) #

Arguments

Return value

Return value.

bool GetClosestPointsOnLines ( vec3 p00, vec3 p01, vec3 p10, vec3 p11, vec3 ret_0, vec3 ret_1 ) #

Arguments

Return value

Return value.

bool GetClosestPointsOnLines ( dvec3 p00, dvec3 p01, dvec3 p10, dvec3 p11, dvec3 ret_0, dvec3 ret_1 ) #

Arguments

Return value

Return value.

vec3 ProjectOntoPlane ( vec3 v, vec3 plane_normal ) #

Arguments

Return value

Return value.

dvec3 ProjectOntoPlane ( dvec3 v, dvec3 plane_normal ) #

Arguments

Return value

Return value.

void TriangleRasterize ( vec2 v0, vec2 v1, vec2 v2, int x0, int y0, int x1, int y1, TriangleRasterizeShader shader ) #

Arguments

  • vec2 v0
  • vec2 v1
  • vec2 v2
  • int x0
  • int y0
  • int x1
  • int y1
  • TriangleRasterizeShader shader
Last update: 2021-06-16
Build: ()