c4d_tools.h File Reference

Classes

struct   SegmentSphereIntersectionData
class   LMinMax
class   SMinMax
class   Random
struct   RayShaderStackElement
struct   MsgGICSExData
struct   MsgGINewData
class   Stratified2DRandom
struct   DisplaceInfo
struct   VolumeData
class   VPBuffer
struct   VideoPostStruct
class   渲染
struct   BakeProgressInfo
struct   BakeTextureResizeNotify
class   GeCipher256

Macros

#define  MAXRANGE
#define  MAXELEMENTS
#define  MIN_EPSILON

Typedefs

typedef LMinMax   MinMax

Enumerations

enum   BakeTexEnums {
   BAKE_TEX_USE_CAMERA_VECTOR ,
   BAKE_TEX_USE_POLYSELECTION ,
   BAKE_TEX_AMBIENT_OCCLUSION ,
   BAKE_TEX_NORMAL ,
   BAKE_TEX_SURFACECOLOR ,
   BAKE_TEX_COLOR ,
   BAKE_TEX_DIFFUSION ,
   BAKE_TEX_LUMINANCE ,
   BAKE_TEX_ALPHA ,
   BAKE_TEX_ILLUMINATION ,
   BAKE_TEX_SHADOWS ,
   BAKE_TEX_BUMP ,
   BAKE_TEX_TRANSPARENCY ,
   BAKE_TEX_UVMAP ,
   BAKE_TEX_REFLECTION ,
   BAKE_TEX_DISPLACEMENT ,
   BAKE_TEX_WIDTH ,
   BAKE_TEX_HEIGHT ,
   BAKE_TEX_PIXELBORDER ,
   BAKE_TEX_FILL_COLOR ,
   BAKE_TEX_UV_LEFT ,
   BAKE_TEX_UV_RIGHT ,
   BAKE_TEX_UV_TOP ,
   BAKE_TEX_UV_BOTTOM ,
   BAKE_TEX_SUPERSAMPLING ,
   BAKE_TEX_USE_BUMP ,
   BAKE_TEX_NO_GI ,
   BAKE_TEX_CONTINUE_UV ,
   BAKE_TEX_USE_PHONG_TAG ,
   BAKE_TEX_COLORPROFILE ,
   BAKE_TEX_SHOW_STATUS ,
   BAKE_TEX_PROGRESS_BITMAP ,
   BAKE_TEX_GENERATE_UNDO ,
   BAKE_TEX_PREVIEW ,
   BAKE_TEX_COLOR_ILLUM ,
   BAKE_TEX_COLOR_SHADOWS ,
   BAKE_TEX_COLOR_LUMINANCE ,
   BAKE_TEX_COLOR_DIFFUSION ,
   BAKE_TEX_LUMINANCE_DIFFUSION ,
   BAKE_TEX_ILLUMINATION_SHADOWS ,
   BAKE_TEX_NORMAL_METHOD ,
   BAKE_TEX_NORMAL_METHOD_OBJECT ,
   BAKE_TEX_NORMAL_METHOD_TANGENT ,
   BAKE_TEX_NORMAL_METHOD_WORLD ,
   BAKE_TEX_NORMAL_FLIP_X ,
   BAKE_TEX_NORMAL_FLIP_Y ,
   BAKE_TEX_NORMAL_FLIP_Z ,
   BAKE_TEX_NORMAL_SWAP_YZ ,
   BAKE_TEX_NORMAL_SOURCE ,
   BAKE_TEX_NORMAL_USE_RAYCAST ,
   BAKE_TEX_SURFACE_ILLUMINATION ,
   BAKE_TEX_AO_VERTEX_MAP ,
   BAKE_TEX_AO_SELFINTERSECTION ,
   BAKE_TEX_AO_VERTEXMAPS ,
   BAKE_TEX_DISPLACEMENT_SOURCE ,
   BAKE_TEX_DISPLACEMENT_HEIGHT ,
   BAKE_TEX_DISPLACEMENT_METHOD ,
   BAKE_TEX_DISPLACEMENT_METHOD_OBJECT ,
   BAKE_TEX_DISPLACEMENT_METHOD_WORLD ,
   BAKE_TEX_DISPLACEMENT_METHOD_TANGENT ,
   BAKE_TEX_DISPLACEMENT_METHOD_INTENSITY ,
   BAKE_TEX_DISPLACEMENT_METHOD_CENTEREDINTENSITY ,
   BAKE_TEX_DISPLACEMENT_METHOD_REDGREEN ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_SUBDIVISION ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_ROUND ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_HQREMAPPING ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_MAPRESULT ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_KEEPEDGES ,
   BAKE_TEX_DISPLACEMENT_SUBPOLY_DISTRIBUTION ,
   BAKE_TEX_RAYCAST_USE_MAX_DISTANCE ,
   BAKE_TEX_RAYCAST_CUSTOM_MAX_DISTANCE ,
   BAKE_TEX_RAYCAST_USE_AUTO_SPIKE_FILTER_THRESHOLD ,
   BAKE_TEX_RAYCAST_CUSTOM_SPIKE_FILTER_THRESHOLD ,
   BAKE_TEX_OPTIMAL_MAPPING ,
   BAKE_TEX_OPTIMAL_MAPPING_OFF ,
   BAKE_TEX_OPTIMAL_MAPPING_CUBIC ,
   BAKE_TEX_OPTIMAL_MAPPING_ANGLE ,
   BAKE_TEX_OPTIMAL_MAPPING_PACKED ,
   BAKE_TEX_OPTIMAL_MAPPING_RELAXCOUNT ,
   BAKE_TEX_OPTIMAL_MAPPING_PREVIEW ,
   BAKE_TEX_NO_INIT_BITMAP ,
   BAKE_TEX_AUTO_SIZE ,
   BAKE_TEX_AUTO_SIZE_MIN ,
   BAKE_TEX_AUTO_SIZE_MAX ,
   BAKE_TEX_AUTO_PIXEL_SIZE ,
   BAKE_TEX_STATUSBAR ,
   BAKE_TEX_DUMMY
}
enum   BAKE_STATE {
   NONE ,
   PREPARE ,
   GI_PREPASS ,
   FILL_IMAGE ,
   COMPLETE ,
   INITIALIZE ,
   RESIZENOTIFY
}

函数

Float64   StepEx ( Float64 a, Float64 x)
Float32   Boxstep ( Float32 a, Float32 b, Float32 x)
Float64   Boxstep ( Float64 a, Float64 b, Float64 x)
Float32   Smoothstep ( Float32 a, Float32 b, Float32 x)
Float64   Smoothstep ( Float64 a, Float64 b, Float64 x)
Float32   Modulo ( Float32 a, Float32 b)
Float64   Modulo ( Float64 a, Float64 b)
Int32   LModulo ( Int32 a, Int32 b)
Int64   LModulo ( Int64 a, Int64 b)
Float32   Bias ( Float32 b, Float32 x)
Float64   Bias ( Float64 b, Float64 x)
Float32   Truncate ( Float32 x)
Float64   Truncate ( Float64 x)
矩阵   MatrixMove (const 向量 &t)
矩阵   MatrixScale (const 向量 &s)
矩阵   MatrixRotX ( Float w)
矩阵   MatrixRotY ( Float w)
矩阵   MatrixRotZ ( Float w)
向量   MatrixToHPB (const 矩阵 &m, ROTATIONORDER rot_order)
向量   VectorToHPB (const 向量 &p)
矩阵   HPBToMatrix (const 向量 &hpb, ROTATIONORDER rot_order)
void  MatrixToRotAxis (const 矩阵 &m, 向量 *v, Float *w)
矩阵   RotAxisToMatrix (const 向量 &v, Float w)
矩阵   RebuildMatrix (const 矩阵 &m)
向量   GetOptimalAngle (const 向量 &hpb_old, const 向量 &hpb_new, ROTATIONORDER order)
向量   PointLineDistance (const 向量 &p0, const 向量 &v, const 向量 &p)
Float   PointLineSegmentDistance (const 向量 &segmentPoint1, const 向量 &segmentPoint2, const 向量 &pos, 向量 *intersectionPoint=nullptr, Float *lineOffset=nullptr)
Float   PointLineSegmentDistance2D (const 向量 &segmentPoint1, const 向量 &segmentPoint2, const 向量 &pos, 向量 *intersectionPoint=nullptr, Float *lineOffset=nullptr)
Vector64   ReflectRay (const Vector64 &v, const Vector64 &n)
Bool   SphereLineIntersection (const 向量 &linePoint1, const 向量 &linePoint2, const 向量 &sphereCenter, Float sphereRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, 向量 *hitPoint1=nullptr, 向量 *hitPoint2=nullptr)
Bool   CircleLineIntersection (const 向量 &linePoint1, const 向量 &linePoint2, const 向量 &circleCenter, Float circleRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, 向量 *hitPoint1=nullptr, 向量 *hitPoint2=nullptr)
Bool   SphereSegmentIntersection (const 向量 &linePoint1, const 向量 &linePoint2, const 向量 &sphereCenter, Float sphereRadius, maxon::BaseArray < SegmentSphereIntersectionData > &intersections)
Bool   CircleSegmentIntersection (const 向量 &linePoint1, const 向量 &linePoint2, const 向量 &circleCenter, Float circleRadius, maxon::BaseArray < SegmentSphereIntersectionData > &intersections)
向量   RGBToHSV (const 向量 &col)
向量   HSVToRGB (const 向量 &col)
向量   RGBToHSL (const 向量 &col)
向量   HSLtoRGB (const 向量 &col)
向量   CalcSplinePoint ( Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const 向量 *padr, const Tangent *tadr=nullptr)
向量   CalcSplineTangent ( Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const 向量 *padr, const Tangent *tadr=nullptr)
void  CalcSplineInsert ( Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const 向量 *padr, const Tangent *tadr, Int32 &pointIndex, 向量 &resultPoint, Tangent &resultTangent, 向量 &leftTangent, 向量 &rightTangent)
Tangent   TransformTangent (const 向量 &newPos, const 向量 &planeNormal, const 向量 &position, const Tangent &tangent, TANGENTSIDE tangentSide, TANGENTTRANSFORMFLAG flags= TANGENTTRANSFORMFLAG::BREAK_SCALE )
void  CalcSplineMovement (const 向量 &newPos, Float offset, SPLINETYPE type, const 矩阵 &splineMg, BaseDraw *bd, const 向量 &planeNormal, Bool closed, Bool lockTangentAngle, Bool lockTangentLength, BREAKTANGENTS breakTangents, Int32 pcnt, 向量 *padr, Tangent *tadr)
Bool   CalcSplineDefaultTangents ( SPLINETYPE type, Bool closed, Int32 pcnt, const 向量 *padr, Tangent *tadr)
SplineObject BooleanSplines ( SplineObject *initialSpline, AtomArray *booleanObjects, BaseDocument *doc, BaseDraw *bd, SPLINEBOOL_AXIS projectionAxis, SPLINEBOOL_MODE booleanMode)
Float   SNoise (const 向量 &p)
Float   SNoise (const 向量 &p, Float t)
Float   噪声 (const 向量 &p)
Float   噪声 (const 向量 &p, Float t)
Float   PNoise (const 向量 &p, const 向量 &d)
Float   PNoise (const 向量 &p, Float t, const 向量 &d, Float dt)
Float   Turbulence (const 向量 &p, Float oct, Bool abs)
Float   Turbulence (const 向量 &p, Float t, Float oct, Bool abs)
Float   WavyTurbulence (const 向量 &p, Float t, Float oct, Float start)
void  InitFbm ( Float *table, Int32 max_octaves, Float lacunarity, Float h)
Float   Fbm ( Float *table, const 向量 &p, Float oct)
Float   Fbm ( Float *table, const 向量 &p, Float t, Float oct)
Float   RidgedMultifractal ( Float *table, const 向量 &p, Float oct, Float offset, Float gain)
Float   CalcSpline ( Float x, Float *knot, Int32 nknots)
向量   CalcSpline ( Float x, 向量 *knot, Int32 nknots)
Float   SNoiseP ( 向量 p, Float t, Int32 t_repeat)
Float   TurbulenceP ( 向量 p, Float t, Float oct, Bool abs, Int32 t_repeat)
Float   FbmP ( Float *table, 向量 p, Float t, Float oct, Int32 t_repeat)
Float   RidgedMultifractalP ( Float *table, 向量 p, Float t, Float oct, Float offset, Float gain, Int32 t_repeat)
RayObject AllocRayObject ( Int32 tex_cnt)
void  FreeRayObject ( RayObject *&op)
RayLight AllocRayLight ( BaseDocument *doc, BaseObject *op)
void  FreeRayLight ( RayLight *&lgt)
Bool   IlluminateRayLight ( RayLight *rl, 向量 *color, Vector64 *light_vector, const Vector64 &p, const Vector64 &n)
void  CalcRestrictionInc (const ObjectRestriction *lr, const RayObject *op, Bool &nodif, Bool &nospec)
enum BAKE_STATE   MAXON_ENUM_LIST ( BAKE_STATE )
BAKE_TEX_ERR   BakeTexture ( BaseDocument *doc, const BaseContainer &data, BaseBitmap *bmp, BaseThread *th, BakeProgressHook *hook, BakeProgressInfo *info)
BaseDocument InitBakeTexture ( BaseDocument *doc, TextureTag *textag, UVWTag *texuvw, UVWTag *destuvw, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)
BaseDocument InitBakeTexture ( BaseDocument *doc, TextureTag **textags, UVWTag **texuvws, UVWTag **destuvws, Int32 cnt, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)

变量

static const Float   COLORTOINT_MULTIPLIER
static const Float   PERCENT
static const Float   THIRD
static const Float   SIXTH
static const Int32   NOISE_RESOLUTION
  NONE
  PREPARE
  GI_PREPASS
  FILL_IMAGE
  COMPLETE
  INITIALIZE
  RESIZENOTIFY
struct BakeProgressInfo   MAXON_ENUM_LIST

Macro Definition Documentation

◆  MAXRANGE

#define MAXRANGE

Maximum value for metric data.

◆  MAXELEMENTS

#define MAXELEMENTS

Maximum number of points.

◆  MIN_EPSILON

#define MIN_EPSILON

Minimum epsilon value.

Typedef Documentation

◆  MinMax

typedef LMinMax MinMax

Function Documentation

◆  GetOptimalAngle()

向量 GetOptimalAngle ( const 向量 hpb_old ,
const 向量 hpb_new ,
ROTATIONORDER   order  
)

Modifies hpb_new so that the "distance" to the last angle hpb_old is at minimum.

注意
Helps to avoid HPB singularity effects.
参数
[in] hpb_old The old HPB.
[in] hpb_new The new HPB.
[in] order The rotation order.
返回
The optimal angle.

◆  PointLineDistance()

向量 PointLineDistance ( const 向量 p0 ,
const 向量 v ,
const 向量 p  
)

Calculates the distance from a point to a line.

参数
[in] p0 The starting point of the line.
[in] v The line vector.
[in] p The point.
返回
The point-line vector.

◆  PointLineSegmentDistance()

Float PointLineSegmentDistance ( const 向量 segmentPoint1 ,
const 向量 segmentPoint2 ,
const 向量 pos ,
向量 intersectionPoint = nullptr ,
Float lineOffset = nullptr  
)

Calculates the distance from a point to a line segment between two points.

由于
R17.032
参数
[in] segmentPoint1 The line segments first point.
[in] segmentPoint2 The line segments second point.
[in] pos The point to test against the line segment.
[out] intersectionPoint Optional, if non-null the intersection point on the segment.
[out] lineOffset Optional, if non-null, the offset along the segment of the intersection point.
返回
A distance between the point and the line segment.

◆  PointLineSegmentDistance2D()

Float PointLineSegmentDistance2D ( const 向量 segmentPoint1 ,
const 向量 segmentPoint2 ,
const 向量 pos ,
向量 intersectionPoint = nullptr ,
Float lineOffset = nullptr  
)

Calculates the distance from a point to a line segment between two points in 2D ignoring the Z value.

由于
R17.032
参数
[in] segmentPoint1 The line segments first point.
[in] segmentPoint2 The line segments second point.
[in] pos The point to test against the line segment.
[out] intersectionPoint Optional, if non-null the intersection point on the segment.
[out] lineOffset Optional, if non-null, the offset along the segment of the intersection point.
返回
A distance between the point and the line segment.

◆  ReflectRay()

Vector64 ReflectRay ( const Vector64 v ,
const Vector64 n  
)

Finds the ray vector after a reflection on a surface normal.

参数
[in] v The incoming ray.
[in] n The surface normal.
返回
The reflected ray.

◆  SphereLineIntersection()

Bool SphereLineIntersection ( const 向量 linePoint1 ,
const 向量 linePoint2 ,
const 向量 sphereCenter ,
Float   sphereRadius ,
Float intersection1 = nullptr ,
Float intersection2 = nullptr ,
向量 hitPoint1 = nullptr ,
向量 hitPoint2 = nullptr  
)

Calculates where the intersection points are between a line and a sphere in 3D space. since R16

参数
[in] linePoint1 The first point of the line.
[in] linePoint2 The second point of the line.
[in] sphereCenter The center of the sphere.
[in] sphereRadius The radius of the sphere.
[out] intersection1 (optional) Assigned the first intersection point (lowest) as an offset between linePoint1 and linePoint2
[out] intersection2 (optional) Assigned the second intersection point (highest) as an offset between linePoint1 and linePoint2
[out] hitPoint1 (optional) Assigned the actual 3D point where the line first intersects (enters) the sphere.
[out] hitPoint2 (optional) Assigned the actual 3D point where the line subsequently intersects (exits) the sphere.
返回
Whether the line segment passed intersected the sphere or not.

◆  CircleLineIntersection()

Bool CircleLineIntersection ( const 向量 linePoint1 ,
const 向量 linePoint2 ,
const 向量 circleCenter ,
Float   circleRadius ,
Float intersection1 = nullptr ,
Float intersection2 = nullptr ,
向量 hitPoint1 = nullptr ,
向量 hitPoint2 = nullptr  
)

Calculates where the intersection points are between a line and a circle in 2D space (although Z will also be calculated on the resulting hit points) since R16

参数
[in] linePoint1 The first point of the line.
[in] linePoint2 The second point of the line.
[in] circleCenter The center of the circle.
[in] circleRadius The radius of the circle.
[out] intersection1 (optional) Assigned the first intersection point (lowest) as an offset between linePoint1 and linePoint2
[out] intersection2 (optional) Assigned the second intersection point (highest) as an offset between linePoint1 and linePoint2
[out] hitPoint1 (optional) Assigned the actual point where the line first intersects (enters) the circle, Z may also be calculated.
[out] hitPoint2 (optional) Assigned the actual point where the line subsequently intersects (exits) the circle, Z may also be calculated.
返回
Whether the line segment passed intersected the circle or not.

◆  SphereSegmentIntersection()

Bool SphereSegmentIntersection ( const 向量 linePoint1 ,
const 向量 linePoint2 ,
const 向量 sphereCenter ,
Float   sphereRadius ,
maxon::BaseArray < SegmentSphereIntersectionData > &  intersections  
)

Calculates where the intersection points are between a segment (a portion of a line) and a sphere in 3D space. since R16

参数
[in] linePoint1 The first point (start) of the segment.
[in] linePoint2 The second point (end) of the segment.
[in] sphereCenter The center of the sphere.
[in] sphereRadius The radius of the sphere.
[out] intersections Assigned the SegmentSphereIntersectionData hit-points.
返回
Whether the line segment passed intersected the sphere or not.

◆  CircleSegmentIntersection()

Bool CircleSegmentIntersection ( const 向量 linePoint1 ,
const 向量 linePoint2 ,
const 向量 circleCenter ,
Float   circleRadius ,
maxon::BaseArray < SegmentSphereIntersectionData > &  intersections  
)

Calculates where the intersection points are between a segment (a portion of a line) and a circle in 2D space (although Z will be calculated for any resulting hit points) since R16

参数
[in] linePoint1 The first point (start) of the segment.
[in] linePoint2 The second point (end) of the segment.
[in] circleCenter The center of the circle.
[in] circleRadius The radius of the circle.
[out] intersections Assigned the SegmentSphereIntersectionData hit-points.
返回
Whether the line segment passed intersected the circle or not.

◆  RGBToHSV()

向量 RGBToHSV ( const 向量 col )

Converts RGB into the HSV color space.

参数
[in] col The RGB color to convert.
返回
The converted HSV color.

◆  HSVToRGB()

向量 HSVToRGB ( const 向量 col )

Converts HSV into the RGB color space.

参数
[in] col The HSV color to convert.
返回
The converted RGB color.

◆  RGBToHSL()

向量 RGBToHSL ( const 向量 col )

Converts RGB into the HSL color space.

参数
[in] col The RGB color to convert.
返回
The converted HSL color.

◆  HSLtoRGB()

向量 HSLtoRGB ( const 向量 col )

Converts HSL into the RGB color space.

参数
[in] col The HSL color to convert.
返回
The converted RGB color.

◆  CalcSplinePoint()

向量 CalcSplinePoint ( Float   offset ,
SPLINETYPE   type ,
Bool   closed ,
Int32   pcnt ,
const 向量 padr ,
const Tangent tadr = nullptr  
)

Calculates a point along a spline curve from a set of points in 3D space.

由于
R17.032
参数
[in] offset The offset along the spline from 0.0 to 1.0 .
[in] type The type of spline, i.e. AKIMA, BSPLINE etc.
[in] closed Whether the spline is closed or not.
[in] pcnt The number of points in the spline.
[in] padr The points array.
[in] tadr The tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline).
返回
The resulting point calculated from the offset.

◆  CalcSplineTangent()

向量 CalcSplineTangent ( Float   offset ,
SPLINETYPE   type ,
Bool   closed ,
Int32   pcnt ,
const 向量 padr ,
const Tangent tadr = nullptr  
)

Calculates the tangent of a point along a spline curve from a given set of points and optional tangents.

由于
R17.032
参数
[in] offset The offset along the spline from 0.0 to 1.0 .
[in] type The type of spline, i.e. AKIMA, BSPLINE etc.
[in] closed Whether the spline is closed or not.
[in] pcnt The number of points in the spline.
[in] padr The points array.
[in] tadr The tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline).
返回
The resulting tangent (normalized) for the given offset.

◆  CalcSplineInsert()

void CalcSplineInsert ( Float   offset ,
SPLINETYPE   type ,
Bool   closed ,
Int32   pcnt ,
const 向量 padr ,
const Tangent tadr ,
Int32 pointIndex ,
向量 resultPoint ,
Tangent resultTangent ,
向量 leftTangent ,
向量 rightTangent  
)

Calculates data about a point would if it were inserted into the spline at the passed offset.

由于
R17.032
参数
[in] offset The offset to calculate the point for.
[in] type The spline type.
[in] closed The closed state of the spline points.
[in] pcnt The number of points in the spline.
[in] padr The address of the points array.
[in] tadr The (optional) address of the tangents array.
[out] pointIndex The index that the resulting point would be if it were inserted into the spline.
[out] resultPoint The position of the resulting point.
[out] resultTangent The spline tangent information of the resulting point.
[out] leftTangent The correct new left tangent (tadr[pointIndex - 1].vr).
[out] rightTangent The correct new right tangent (tadr[pointIndex].vl).

◆  TransformTangent()

Tangent TransformTangent ( const 向量 newPos ,
const 向量 planeNormal ,
const 向量 position ,
const Tangent tangent ,
TANGENTSIDE   tangentSide ,
TANGENTTRANSFORMFLAG   flags = TANGENTTRANSFORMFLAG::BREAK_SCALE  
)

Creates a transformed tangent around a point and plane, allowing to directly set the position of one of the tangent handles and automatically rotating the rest of the tangent to match.

由于
R17.032
参数
[in] newPos The new position for the tangent handle.
[in] planeNormal The normal of the plane for rotation of the handles.
[in] position The position of the center of the tangent being modified.
[in] tangent The tangent to modify/derive the resulting tangent from.
[in] tangentSide The handle to modify of the tangent, left, right, or none.
[in] flags The flags for controlling tangent breaking, rotation and scale locking etc.
返回
The resulting transformed tangent.

◆  CalcSplineMovement()

void CalcSplineMovement ( const 向量 newPos ,
Float   offset ,
SPLINETYPE   type ,
const 矩阵 splineMg ,
BaseDraw bd ,
const 向量 planeNormal ,
Bool   closed ,
Bool   lockTangentAngle ,
Bool   lockTangentLength ,
BREAKTANGENTS   breakTangents ,
Int32   pcnt ,
向量 padr ,
Tangent tadr  
)

Moves a point on a spline curve to a user specified new position.

由于
R17.032
参数
[in] newPos The new position for the point of the curve at offset.
[in] offset The offset to move to the position newPos .
[in] type The type of spline to move.
[in] splineMg The matrix of the spline.
[in] bd The (optional) basedraw.
[in] planeNormal The normal for tangent rotation, typically Vector(0,0,1) .
[in] closed The closed state of the spline.
[in] lockTangentAngle true if tangents angle may not be changed by this routine.
[in] lockTangentLength true if the tangents length may not be changed by this routine.
[in] breakTangents Set to break the tangents while manipulating the curve if tangents exist.
[in] pcnt The number of points in the spline.
[out] padr The address of the points that describe the spline.
[out] tadr The (optional) address of the tangents that are used by the spline.

◆  CalcSplineDefaultTangents()

Bool CalcSplineDefaultTangents ( SPLINETYPE   type ,
Bool   closed ,
Int32   pcnt ,
const 向量 padr ,
Tangent tadr  
)

Calculates the default tangents for the passed points (spline segment) based on the spline type.

由于
R17.032
参数
[in] type The spline type to calculate the tangents for.
[in] closed Whether the spline segment is closed.
[in] pcnt The number of points to calculate.
[in] padr The address of the points.
[out] tadr The resulting tangents (caller owns the array, must be pre-allocated).
返回
true on success, false on failure to generate the tangents.

◆  BooleanSplines()

SplineObject * BooleanSplines ( SplineObject initialSpline ,
AtomArray booleanObjects ,
BaseDocument doc ,
BaseDraw bd ,
SPLINEBOOL_AXIS   projectionAxis ,
SPLINEBOOL_MODE   booleanMode  
)

Booleans an initial SplineObject with an array of other SplineObjects along a passed projection axis (in 2D).

由于
R17.032
参数
[in] initialSpline The original SplineObject that will have the operations applied to it.
[in] booleanObjects The array of SplineObjects to boolean with the initialSpline.
[in] doc The active document that the objects belong to.
[in] bd The active BaseDraw .
[in] projectionAxis The projection axis to use, XY, ZY, screen space etc.
[in] booleanMode The type of boolean to apply (Union, Subtract etc).
返回
The result of the Boolean operation (a new SplineObject , called owns), nullptr if there was an error.

◆  CalcSpline() [1/2]

Float CalcSpline ( Float   x ,
Float knot ,
Int32   nknots  
)

Calculates the value of a spline at a point.

参数
[in] x The position on the spline.
[in] knot The spline knots array. The caller owns the pointed array.
[in] nknots The number of knots.
返回
The spline value.

◆  CalcSpline() [2/2]

向量 CalcSpline ( Float   x ,
向量 knot ,
Int32   nknots  
)

Calculates the value of a spline at a point.

参数
[in] x The position on the spline.
[in] knot The spline knots array. The caller owns the pointed array.
[in] nknots The number of knots.
返回
The spline point.

◆  CalcRestrictionInc()

void CalcRestrictionInc ( const ObjectRestriction lr ,
const RayObject op ,
Bool nodif ,
Bool nospec  
)

Calculates the include-/exclude situation for a given object op light source ( &light->lr is passed).

参数
[in] lr The light restriction to evaluate. The caller owns the pointed light restriction.
[in] op The object to evaluate. The caller owns the pointed object.
[in,out] nodif Must be initialized with false before the call. Assigned true if lr specifies that op should not receive any diffuse light.
[in,out] nospec Must be initialized with false before the call. Assigned true if lr specifies that op should not receive any specular light.

◆  BakeTexture()

BAKE_TEX_ERR BakeTexture ( BaseDocument doc ,
const BaseContainer data ,
BaseBitmap bmp ,
BaseThread th ,
BakeProgressHook hook ,
BakeProgressInfo info  
)

Bakes the texture(s) specified by the last InitBakeTexture() call into bmp .

参数
[in] doc The document. The caller owns the pointed document.
[in] data The bake settings: BakeTexEnums
[out] bmp The bitmap to bake to. If this points to a MultipassBitmap , it must be initialized with the correct width and height before BakeTexture() is called. The caller owns the pointed bitmap.
If this points to a MultipassBitmap , it must be initialized with the correct width and height before BakeTexture() is called.
Multipass bitmaps must be used if BAKE_TEX_AMBIENT_OCCLUSION is set. The only allowed modes for multipass bitmaps are COLORMODE::RGB , COLORMODE::ARGB , COLORMODE::RGBw , COLORMODE::ARGBw , COLORMODE::RGBf , COLORMODE::ARGBf .
[in] th The current thread. The caller owns the pointed document.
[in] hook The bake progress hook callback function pointer.
[in] info The bake progress information passed to the hook callback.
返回
BAKE_TEX_ERR::NONE if successful, otherwise one of these errors: BAKE_TEX_ERR

◆  InitBakeTexture() [1/2]

BaseDocument * InitBakeTexture ( BaseDocument doc ,
TextureTag textag ,
UVWTag texuvw ,
UVWTag destuvw ,
const BaseContainer bc ,
BAKE_TEX_ERR err = nullptr ,
BaseThread th = nullptr  
)

Initializes a bake operation of a single tag for BakeTexture() .

参数
[in] doc The document. The caller owns the pointed document.
[in] textag The texture tag to bake. Must be assigned to an object. The caller owns the pointed tag.
[in] texuvw The UVW tag to bake. Must be valid if UVW projection is selected in the tag, ignored otherwise. The caller owns the pointed tag.
[out] destuvw The destination UVW tag for the bake. If not nullptr , the current projection is transformed into the uvw tag. The caller owns the pointed tag.
[in] bc The bake settings: BakeTexEnums
[out] err Assigned the error result, if not nullptr : BAKE_TEX_ERR
[in] th The current thread. The caller owns the pointed document.
返回
The document for the bake to use for the call to BakeTexture() . The caller owns the pointed document.

◆  InitBakeTexture() [2/2]

BaseDocument * InitBakeTexture ( BaseDocument doc ,
TextureTag **  textags ,
UVWTag **  texuvws ,
UVWTag **  destuvws ,
Int32   cnt ,
const BaseContainer bc ,
BAKE_TEX_ERR err = nullptr ,
BaseThread th = nullptr  
)

Initializes a bake operation of multiple tags for BakeTexture() .

参数
[in] doc The document. The caller owns the pointed document.
[in] textags The texture tags to bake. Must be assigned to objects. The caller owns the pointed array.
[in] texuvws The UVW tags to bake. The caller owns the pointed array.
[out] destuvws The destination UVW tags for the bake. If not nullptr , the current projection is transformed into the uvw tags. The caller owns the pointed array.
[in] cnt The number of tags in textags , texuvws and destuvws arrays.
[in] bc The bake settings: BakeTexEnums
[out] err Assigned the error result, if not nullptr : BAKE_TEX_ERR
[in] th The current thread. The caller owns the pointed document.
返回
The document for the bake to use for the call to BakeTexture() . The caller owns the pointed document.

Variable Documentation

◆  COLORTOINT_MULTIPLIER

const Float COLORTOINT_MULTIPLIER static

Constant to convert from vectors color components to integers.

由于
R18

◆  PERCENT

const Float PERCENT static

Constant to convert from 0 - 1 range to percentage.

◆  THIRD

const Float THIRD static

Constant to calculate the third of a value.

◆  SIXTH

const Float SIXTH static

Constant to calculate the sixth of a value.

◆  NONE

NONE

None.

◆  PREPARE

PREPARE

Prepare.

◆  GI_PREPASS

GI_PREPASS

GI prepass.

◆  FILL_IMAGE

FILL_IMAGE

Fill image.

◆  COMPLETE

COMPLETE

Complete.

◆  INITIALIZE

INITIALIZE

Initialize.

◆  RESIZENOTIFY

RESIZENOTIFY

Resize notify. See BakeTextureResizeNotify .