Open Search
    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  Render
     
    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 class  BAKE_STATE {
      NONE ,
      PREPARE ,
      GI_PREPASS ,
      FILL_IMAGE ,
      COMPLETE ,
      INITIALIZE ,
      RESIZENOTIFY
    }
     

    Functions

    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)
     
    Matrix MatrixMove (const Vector &t)
     
    Matrix MatrixScale (const Vector &s)
     
    Matrix MatrixRotX (Float w)
     
    Matrix MatrixRotY (Float w)
     
    Matrix MatrixRotZ (Float w)
     
    Vector MatrixToHPB (const Matrix &m, ROTATIONORDER rot_order, Bool isNormalized=false)
     
    Vector VectorToHPB (const Vector &p)
     
    Matrix HPBToMatrix (const Vector &hpb, ROTATIONORDER rot_order)
     
    void MatrixToRotAxis (const Matrix &m, Vector *v, Float *w)
     
    Matrix RotAxisToMatrix (const Vector &v, Float w)
     
    Matrix RebuildMatrix (const Matrix &m)
     
    Matrix DirectionVectorToRotationMatrix (const Vector &direction, const Vector &pivotDirection)
     
    Vector GetOptimalAngle (const Vector &hpb_old, const Vector &hpb_new, ROTATIONORDER order)
     
    Vector PointLineDistance (const Vector &p0, const Vector &v, const Vector &p)
     
    Float PointLineSegmentDistance (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &pos, Vector *intersectionPoint=nullptr, Float *lineOffset=nullptr)
     
    Float PointLineSegmentDistance2D (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &pos, Vector *intersectionPoint=nullptr, Float *lineOffset=nullptr)
     
    Vector64 ReflectRay (const Vector64 &v, const Vector64 &n)
     
    Bool SphereLineIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &sphereCenter, Float sphereRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, Vector *hitPoint1=nullptr, Vector *hitPoint2=nullptr)
     
    Bool CircleLineIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &circleCenter, Float circleRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, Vector *hitPoint1=nullptr, Vector *hitPoint2=nullptr)
     
    Bool SphereSegmentIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &sphereCenter, Float sphereRadius, maxon::BaseArray< SegmentSphereIntersectionData > &intersections)
     
    Bool CircleSegmentIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &circleCenter, Float circleRadius, maxon::BaseArray< SegmentSphereIntersectionData > &intersections)
     
    Vector RGBToHSV (const Vector &col)
     
    Vector HSVToRGB (const Vector &col)
     
    Vector RGBToHSL (const Vector &col)
     
    Vector HSLtoRGB (const Vector &col)
     
    Vector CalcSplinePoint (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr=nullptr)
     
    Vector CalcSplineTangent (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr=nullptr)
     
    void CalcSplineInsert (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr, Int32 &pointIndex, Vector &resultPoint, Tangent &resultTangent, Vector &leftTangent, Vector &rightTangent)
     
    Tangent TransformTangent (const Vector &newPos, const Vector &planeNormal, const Vector &position, const Tangent &tangent, TANGENTSIDE tangentSide, TANGENTTRANSFORMFLAG flags=TANGENTTRANSFORMFLAG::BREAK_SCALE)
     
    void CalcSplineMovement (const Vector &newPos, Float offset, SPLINETYPE type, const Matrix &splineMg, BaseDraw *bd, const Vector &planeNormal, Bool closed, Bool lockTangentAngle, Bool lockTangentLength, BREAKTANGENTS breakTangents, Int32 pcnt, Vector *padr, Tangent *tadr)
     
    Bool CalcSplineDefaultTangents (SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, Tangent *tadr)
     
    PointObjectBooleanSplines (PointObject *initialSpline, AtomArray *booleanObjects, BaseDocument *doc, BaseDraw *bd, SPLINEBOOL_AXIS projectionAxis, SPLINEBOOL_MODE booleanMode)
     
    Float SNoise (const Vector &p)
     
    Float SNoise (const Vector &p, Float t)
     
    Float Noise (const Vector &p)
     
    Float Noise (const Vector &p, Float t)
     
    Float PNoise (const Vector &p, const Vector &d)
     
    Float PNoise (const Vector &p, Float t, const Vector &d, Float dt)
     
    Float Turbulence (const Vector &p, Float oct, Bool abs)
     
    Float Turbulence (const Vector &p, Float t, Float oct, Bool abs)
     
    Float WavyTurbulence (const Vector &p, Float t, Float oct, Float start)
     
    void InitFbm (Float *table, Int32 max_octaves, Float lacunarity, Float h)
     
    Float Fbm (Float *table, const Vector &p, Float oct)
     
    Float Fbm (Float *table, const Vector &p, Float t, Float oct)
     
    Float RidgedMultifractal (Float *table, const Vector &p, Float oct, Float offset, Float gain)
     
    Float CalcSpline (Float x, const Float *knot, Int32 nknots)
     
    Vector CalcSpline (Float x, const Vector *knot, Int32 nknots)
     
    Float SNoiseP (Vector p, Float t, Int32 t_repeat)
     
    Float TurbulenceP (Vector p, Float t, Float oct, Bool abs, Int32 t_repeat)
     
    Float FbmP (Float *table, Vector p, Float t, Float oct, Int32 t_repeat)
     
    Float RidgedMultifractalP (Float *table, Vector p, Float t, Float oct, Float offset, Float gain, Int32 t_repeat)
     
    RayObjectAllocRayObject (Int32 tex_cnt)
     
    void FreeRayObject (RayObject *&op)
     
    RayLightAllocRayLight (BaseDocument *doc, BaseObject *op)
     
    void FreeRayLight (RayLight *&lgt)
     
    Bool IlluminateRayLight (RayLight *rl, Vector *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)
     
    BaseDocumentInitBakeTexture (BaseDocument *doc, TextureTag *textag, UVWTag *texuvw, UVWTag *destuvw, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)
     
    BaseDocumentInitBakeTexture (BaseDocument *doc, TextureTag **textags, UVWTag **texuvws, UVWTag **destuvws, Int32 cnt, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)
     

    Variables

    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()

    Vector GetOptimalAngle ( const Vector hpb_old,
    const Vector hpb_new,
    ROTATIONORDER  order 
    )

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

    Note
    Helps to avoid HPB singularity effects.
    Parameters
    [in]hpb_oldThe old HPB.
    [in]hpb_newThe new HPB.
    [in]orderThe rotation order.
    Returns
    The optimal angle.

    ◆ PointLineDistance()

    Vector PointLineDistance ( const Vector p0,
    const Vector v,
    const Vector p 
    )

    Calculates the distance from a point to a line.

    Parameters
    [in]p0The starting point of the line.
    [in]vThe line vector.
    [in]pThe point.
    Returns
    The point-line vector.

    ◆ PointLineSegmentDistance()

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

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

    Since
    R17.032
    Parameters
    [in]segmentPoint1The line segments first point.
    [in]segmentPoint2The line segments second point.
    [in]posThe point to test against the line segment.
    [out]intersectionPointOptional, if non-null the intersection point on the segment.
    [out]lineOffsetOptional, if non-null, the offset along the segment of the intersection point.
    Returns
    A distance between the point and the line segment.

    ◆ PointLineSegmentDistance2D()

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

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

    Since
    R17.032
    Parameters
    [in]segmentPoint1The line segments first point.
    [in]segmentPoint2The line segments second point.
    [in]posThe point to test against the line segment.
    [out]intersectionPointOptional, if non-null the intersection point on the segment.
    [out]lineOffsetOptional, if non-null, the offset along the segment of the intersection point.
    Returns
    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.

    Parameters
    [in]vThe incoming ray.
    [in]nThe surface normal.
    Returns
    The reflected ray.

    ◆ SphereLineIntersection()

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

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

    Parameters
    [in]linePoint1The first point of the line.
    [in]linePoint2The second point of the line.
    [in]sphereCenterThe center of the sphere.
    [in]sphereRadiusThe 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.
    Returns
    Whether the line segment passed intersected the sphere or not.

    ◆ CircleLineIntersection()

    Bool CircleLineIntersection ( const Vector linePoint1,
    const Vector linePoint2,
    const Vector circleCenter,
    Float  circleRadius,
    Float intersection1 = nullptr,
    Float intersection2 = nullptr,
    Vector hitPoint1 = nullptr,
    Vector 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

    Parameters
    [in]linePoint1The first point of the line.
    [in]linePoint2The second point of the line.
    [in]circleCenterThe center of the circle.
    [in]circleRadiusThe 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.
    Returns
    Whether the line segment passed intersected the circle or not.

    ◆ SphereSegmentIntersection()

    Bool SphereSegmentIntersection ( const Vector linePoint1,
    const Vector linePoint2,
    const Vector 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

    Parameters
    [in]linePoint1The first point (start) of the segment.
    [in]linePoint2The second point (end) of the segment.
    [in]sphereCenterThe center of the sphere.
    [in]sphereRadiusThe radius of the sphere.
    [out]intersectionsAssigned the SegmentSphereIntersectionData hit-points.
    Returns
    Whether the line segment passed intersected the sphere or not.

    ◆ CircleSegmentIntersection()

    Bool CircleSegmentIntersection ( const Vector linePoint1,
    const Vector linePoint2,
    const Vector 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

    Parameters
    [in]linePoint1The first point (start) of the segment.
    [in]linePoint2The second point (end) of the segment.
    [in]circleCenterThe center of the circle.
    [in]circleRadiusThe radius of the circle.
    [out]intersectionsAssigned the SegmentSphereIntersectionData hit-points.
    Returns
    Whether the line segment passed intersected the circle or not.

    ◆ RGBToHSV()

    Vector RGBToHSV ( const Vector col)

    Converts RGB into the HSV color space.

    Parameters
    [in]colThe RGB color to convert.
    Returns
    The converted HSV color.

    ◆ HSVToRGB()

    Vector HSVToRGB ( const Vector col)

    Converts HSV into the RGB color space.

    Parameters
    [in]colThe HSV color to convert.
    Returns
    The converted RGB color.

    ◆ RGBToHSL()

    Vector RGBToHSL ( const Vector col)

    Converts RGB into the HSL color space.

    Parameters
    [in]colThe RGB color to convert.
    Returns
    The converted HSL color.

    ◆ HSLtoRGB()

    Vector HSLtoRGB ( const Vector col)

    Converts HSL into the RGB color space.

    Parameters
    [in]colThe HSL color to convert.
    Returns
    The converted RGB color.

    ◆ CalcSplinePoint()

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

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

    Since
    R17.032
    Parameters
    [in]offsetThe offset along the spline from 0.0 to 1.0.
    [in]typeThe type of spline, i.e. AKIMA, BSPLINE etc.
    [in]closedWhether the spline is closed or not.
    [in]pcntThe number of points in the spline.
    [in]padrThe points array.
    [in]tadrThe tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline).
    Returns
    The resulting point calculated from the offset.

    ◆ CalcSplineTangent()

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

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

    Since
    R17.032
    Parameters
    [in]offsetThe offset along the spline from 0.0 to 1.0.
    [in]typeThe type of spline, i.e. AKIMA, BSPLINE etc.
    [in]closedWhether the spline is closed or not.
    [in]pcntThe number of points in the spline.
    [in]padrThe points array.
    [in]tadrThe tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline).
    Returns
    The resulting tangent (normalized) for the given offset.

    ◆ CalcSplineInsert()

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

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

    Since
    R17.032
    Parameters
    [in]offsetThe offset to calculate the point for.
    [in]typeThe spline type.
    [in]closedThe closed state of the spline points.
    [in]pcntThe number of points in the spline.
    [in]padrThe address of the points array.
    [in]tadrThe (optional) address of the tangents array.
    [out]pointIndexThe index that the resulting point would be if it were inserted into the spline.
    [out]resultPointThe position of the resulting point.
    [out]resultTangentThe spline tangent information of the resulting point.
    [out]leftTangentThe correct new left tangent (tadr[pointIndex - 1].vr).
    [out]rightTangentThe correct new right tangent (tadr[pointIndex].vl).

    ◆ TransformTangent()

    Tangent TransformTangent ( const Vector newPos,
    const Vector planeNormal,
    const Vector 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.

    Since
    R17.032
    Parameters
    [in]newPosThe new position for the tangent handle.
    [in]planeNormalThe normal of the plane for rotation of the handles.
    [in]positionThe position of the center of the tangent being modified.
    [in]tangentThe tangent to modify/derive the resulting tangent from.
    [in]tangentSideThe handle to modify of the tangent, left, right, or none.
    [in]flagsThe flags for controlling tangent breaking, rotation and scale locking etc.
    Returns
    The resulting transformed tangent.

    ◆ CalcSplineMovement()

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

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

    Since
    R17.032
    Parameters
    [in]newPosThe new position for the point of the curve at offset.
    [in]offsetThe offset to move to the position newPos.
    [in]typeThe type of spline to move.
    [in]splineMgThe matrix of the spline.
    [in]bdThe (optional) basedraw.
    [in]planeNormalThe normal for tangent rotation, typically Vector(0,0,1).
    [in]closedThe closed state of the spline.
    [in]lockTangentAngletrue if tangents angle may not be changed by this routine.
    [in]lockTangentLengthtrue if the tangents length may not be changed by this routine.
    [in]breakTangentsSet to break the tangents while manipulating the curve if tangents exist.
    [in]pcntThe number of points in the spline.
    [out]padrThe address of the points that describe the spline.
    [out]tadrThe (optional) address of the tangents that are used by the spline.

    ◆ CalcSplineDefaultTangents()

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

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

    Since
    R17.032
    Parameters
    [in]typeThe spline type to calculate the tangents for.
    [in]closedWhether the spline segment is closed.
    [in]pcntThe number of points to calculate.
    [in]padrThe address of the points.
    [out]tadrThe resulting tangents (caller owns the array, must be pre-allocated).
    Returns
    true on success, false on failure to generate the tangents.

    ◆ BooleanSplines()

    PointObject* BooleanSplines ( PointObject 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).

    Since
    R17.032
    Parameters
    [in]initialSplineThe original SplineObject or LineObject that will have the operations applied to it.
    [in]booleanObjectsThe array of SplineObjects to boolean with the initialSpline.
    [in]docThe active document that the objects belong to.
    [in]bdThe active BaseDraw.
    [in]projectionAxisThe projection axis to use, XY, ZY, screen space etc.
    [in]booleanModeThe type of boolean to apply (Union, Subtract etc).
    Returns
    The result of the Boolean operation (a new SplineObject, called owns), nullptr if there was an error.

    ◆ CalcSpline() [1/2]

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

    Calculates the value of a spline at a point.

    Parameters
    [in]xThe position on the spline.
    [in]knotThe spline knots array. The caller owns the pointed array.
    [in]nknotsThe number of knots.
    Returns
    The spline value.

    ◆ CalcSpline() [2/2]

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

    Calculates the value of a spline at a point.

    Parameters
    [in]xThe position on the spline.
    [in]knotThe spline knots array. The caller owns the pointed array.
    [in]nknotsThe number of knots.
    Returns
    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 and a light source (&light->lr is passed).

    Parameters
    [in]lrThe light restriction to evaluate. The caller owns the pointed light restriction.
    [in]opThe object to evaluate. The caller owns the pointed object.
    [in,out]nodifMust be initialized with false before the call. Assigned true if lr specifies that op should not receive any diffuse light.
    [in,out]nospecMust 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.

    Parameters
    [in]docThe document. The caller owns the pointed document.
    [in]dataThe bake settings: BakeTexEnums
    [out]bmpThe 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]thThe current thread. The caller owns the pointed document.
    [in]hookThe bake progress hook callback function pointer.
    [in]infoThe bake progress information passed to the hook callback.
    Returns
    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().

    Parameters
    [in]docThe document. The caller owns the pointed document.
    [in]textagThe texture tag to bake. Must be assigned to an object. The caller owns the pointed tag.
    [in]texuvwThe UVW tag to bake. Must be valid if UVW projection is selected in the tag, ignored otherwise. The caller owns the pointed tag.
    [out]destuvwThe 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]bcThe bake settings: BakeTexEnums
    [out]errAssigned the error result, if not nullptr: BAKE_TEX_ERR
    [in]thThe current thread. The caller owns the pointed document.
    Returns
    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().

    Parameters
    [in]docThe document. The caller owns the pointed document.
    [in]textagsThe texture tags to bake. Must be assigned to objects. The caller owns the pointed array.
    [in]texuvwsThe UVW tags to bake. The caller owns the pointed array.
    [out]destuvwsThe 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]cntThe number of tags in textags, texuvws and destuvws arrays.
    [in]bcThe bake settings: BakeTexEnums
    [out]errAssigned the error result, if not nullptr: BAKE_TEX_ERR
    [in]thThe current thread. The caller owns the pointed document.
    Returns
    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.

    Since
    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.