Changes between Version 9 and Version 10 of FDORfc59


Ignore:
Timestamp:
Apr 10, 2011, 3:55:21 PM (13 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc59

    v9 v10  
    166166{
    167167protected:
    168 
    169168    /// \brief
    170169    /// Constructs a default instance.
     
    179178}}}
    180179
     180=== Class FdoISpiralSegmentAbstract ===
     181
     182{{{
     183/// \brief
     184/// The FdoISpiralSegmentAbstract class represets a Spiral curve segment (abstract)
     185///
     186class FdoISpiralSegmentAbstract : public FdoICurveSegmentAbstract
     187{
     188public:
     189    /// \brief
     190    /// Gets the clockwise state from this spiral segment.
     191    ///
     192    /// \return
     193    /// Returns true if the spiral is defined clockwise, otherwise false
     194    ///
     195    virtual bool GetIsClockwise() const = 0;
     196};
     197}}}
     198
     199=== Class FdoISplineSegmentAbstract ===
     200
     201{{{
     202/// \brief
     203/// The FdoISplineSegmentAbstract class is the base class for
     204/// Spline segments (abstract)
     205///
     206class FdoISplineSegmentAbstract : public FdoICurveSegmentAbstract
     207{
     208public:
     209    /// \brief
     210    /// Gets the algebraic degree of the spline's basis function.
     211    /// The spline's degree is a positive integer that is the degree
     212    /// of the polynomial equations used to calculate the pieces of
     213    /// the spline. For Cubic splines, the degree is fixed at 3.
     214    ///
     215    /// \return
     216    /// Returns an interger specifying the spline's degree value
     217    ///
     218    virtual FdoInt32 GetDegree() const = 0;
     219
     220    /// \brief
     221    /// Gets the the interpolation mechanism for a spline Geometry.
     222    /// Is fixed as Cubic for Cubic splines. Can be polynomial or
     223    /// Rational for B-Splines.
     224    ///
     225    /// \return
     226    /// Returns the interpolation mechanism used to create the spline
     227    ///
     228    virtual FdoGeometricInterpolationType GetInterpolationType() const = 0;
     229
     230    /// \brief
     231    /// Gets the collection of control position associated to this Spline Geometry.
     232    ///
     233    /// \return
     234    /// Returns the collection of control positions associated to the spline
     235    ///
     236    virtual FdoDirectPositionCollection const* GetControlPositions() const = 0;
     237
     238    /// \brief
     239    /// Gets the number of control positions associated to this Spline geometry.
     240    ///
     241    /// \return
     242    /// Returns the control position count
     243    ///
     244    virtual FdoInt32 GetControlPositionCount() const = 0;
     245
     246    /// \brief
     247    /// Gets a control position at the specified (zero-based) index.
     248    ///
     249    /// \param index
     250    /// Input Zero-based index in the Spline's list of control positions.
     251    ///
     252    /// \return
     253    /// Returns the control position position at the specified index
     254    ///
     255    virtual FdoIDirectPosition const* GetControlPosition(FdoInt32 index) const = 0;
     256
     257    /// \brief
     258    /// Gets the control position at the specified (zero-based) index,
     259    /// by values of its member data.
     260    /// This is in aid of higher performance for any implementation that
     261    /// does not internally use FdoIDirectPosition objects for storage, or for
     262    /// an application seeking to avoid overhead of accessor methods.
     263    ///
     264    /// \param index
     265    /// Input Zero-based index in the object's list of control positions.
     266    /// \param x
     267    /// Output X ordinate value.
     268    /// \param y
     269    /// Output Y ordinate value.
     270    /// \param z
     271    /// Output Z ordinate value.
     272    /// \param m
     273    /// Output M ordinate value.
     274    /// \param dimensionality
     275    /// Output Dimensionality of ordinates in this control position.
     276    ///
     277    /// \return
     278    /// Returns nothing
     279    ///
     280    virtual void GetControlPositionByMembers(
     281        FdoInt32 index,
     282        double *x,
     283        double *y,
     284        double *z,
     285        double *m,
     286        FdoInt32 *dimensionality) const = 0;
     287
     288    /// \brief
     289    /// Gets the spline control positions as an array.
     290    ///
     291    /// \remarks
     292    /// The caller must not free the returned array.
     293    /// The ordinates are in the order XYZMXYZM..., with only those present
     294    /// according to the dimensionality.
     295    ///
     296    /// \return
     297    /// Returns the spline's control positions ordinates
     298    ///
     299    virtual const double * GetControlPositionOrdinates() = 0;
     300};
     301}}}
     302
     303=== Class FdoICubicSplineSegment ===
     304
     305{{{
     306/// \brief
     307/// The FdoICubicSplineSegment class is a Cubic Spline geometry type.
     308/// A cubic spline is a spline constructed of piecewise third-order polynomials
     309/// which pass through a set of control positions. The second derivative of each
     310/// polynomial is commonly set to zero at the end position, since this provides a
     311/// boundary condition that completes the system of equations.
     312///
     313class FdoICubicSplineSegment : public FdoISplineSegmentAbstract
     314{
     315public:
     316    /// \brief
     317    /// Gets the unit tangent vector at the start position of the spline.
     318    /// Only the direction of the vectors shall be used to determine
     319    /// the shape of the cubic spline, not their length.
     320    ///
     321    /// \return
     322    /// Returns the tangent vector
     323    ///
     324    virtual FdoIDirectPosition const * GetStartTangent() const = 0;
     325
     326    /// \brief
     327    /// Gets the unit tangent vector at the end position of the spline.
     328    /// Only the direction of the vectors shall be used to determine
     329    /// the shape of the cubic spline, not their length.
     330    ///
     331    /// \return
     332    /// Returns the tangent vector
     333    ///
     334    virtual FdoIDirectPosition const * GetEndTangent() const = 0;
     335};
     336}}}
     337
     338=== Enum GeometricKnotTypes ===
     339
     340{{{
     341/// \brief
     342/// Enumeration used to identify the B-spline knot type used to
     343/// ineterpolate a B-Spline. 
     344///
     345/// \remarks
     346/// A B-spline is uniform if and only if all knots are
     347/// of multiplicity 1 and they differ by a positive constant
     348/// from the preceding knot.
     349///
     350/// A B-spline is quasi-uniform if and
     351/// only if the knots are of multiplicity (degree+1) at the ends,
     352/// of multiplicity 1 elsewhere, and they differ by a positive constant
     353/// from the preceding knot.
     354///
     355/// In general, in a piecewise Bezier knot vector, the first k knots are
     356/// the same, then each subsequent group of k-1 knots is the same,
     357/// until you get to the end. Note that a piecewise Bézier curve must
     358/// have nk–1 control positions, where n is the number of segments
     359/// (i.e., the number of control positions is one less than an even
     360/// multiple of the order).
     361///
     362enum FdoGeometricKnotType
     363{
     364    /// The knots are appropriate for a uniform B-spline.
     365    /// e.g. [0 1 2 3 4 5].
     366    ///
     367    FdoGeometricKnotType_Uniform = 500,
     368
     369    /// The knots are appropriate for a quasi-uniform B-spline.
     370    /// e.g. [0 0 0 0 1 2 3 3 3 3]
     371    ///
     372    FdoGeometricKnotType_QuasiUniform = 501,
     373
     374    /// The knots are appropriate for a piecewise Bezier curve.
     375    /// e.g. [0 0 0 1 1 2 2 3 3 3]
     376    ///
     377    FdoGeometricKnotType_PiecewiseBezier = 502,
     378};
     379}}}
     380
     381=== Class FdoIBSplineKnot ===
     382
     383{{{
     384/// \brief
     385/// Controls the constructive parameter space for spline curves.
     386/// Each knot sequence is used for a dimension of the spline's
     387/// parameter space.
     388///
     389class FdoIBSplineKnot : public FdoIDisposable
     390{
     391public:
     392
     393    /// \brief
     394    /// Gets the value of the parameter at the knot of the spline.
     395    /// The sequence of knots shall be a nondecreasing sequence.
     396    /// That is, each knot's value in the sequence shall be equal
     397    /// to or greater than the previous knot's value. The use of
     398    /// equal consecutive knots is normally handled using the
     399    /// multiplicity.
     400    ///
     401    /// \return
     402    /// Returns the knot parameter
     403    ///
     404    virtual double GetValue() const = 0;
     405
     406    /// \brief
     407    /// Gets The value of the averaging weight used for this
     408    /// knot of the spline
     409    ///
     410    /// \return
     411    /// Returns the knot weight
     412    ///
     413    virtual double GetWeight() const = 0;
     414
     415    /// \brief
     416    /// Gets the multiplicity of this knot used in the definition of
     417    /// the spline (with the same weight).
     418    ///
     419    /// \return
     420    /// Returns the knot multiplicity
     421    ///
     422    virtual FdoInt32 GetMultiplicity() const = 0;
     423};
     424}}}
     425
     426=== Class FdoBSplineKnotCollection ===
     427{{{
     428/// \brief
     429///  The FdoBSplineKnotCollection class is a collection of FdoIBSplineKnot objects.
     430///
     431class FdoBSplineKnotCollection : public FdoCollection<FdoIBSplineKnot, FdoException>
     432{
     433public:
     434    /// \brief
     435    /// Creates an instance of FdoBSplineKnotCollection with no contained elements.
     436    ///
     437    /// \return
     438    /// Returns an empty collection
     439    ///
     440    static FdoBSplineKnotCollection* Create()
     441    {
     442        FdoBSplineKnotCollection* value = new FdoBSplineKnotCollection();
     443        if (NULL == value)
     444            throw FdoException::Create(
     445                FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC)));
     446        return value;
     447    }
     448};
     449}}}
     450
     451=== Class FdoIBSplineSegment ===
     452
     453{{{
     454/// \brief
     455/// The FdoIBSplineSegment class is a B-Spline geometry type.
     456/// A B-Spline is a piecewise parametric polynomial or rational
     457/// curve described in terms of control positions and basis functions.
     458/// The interpolation method may be either "polynomial" or "rational"
     459/// depending on the interpolation type; default is "polynomial".
     460///
     461class FdoIBSplineSegment : public FdoISplineSegmentAbstract
     462{
     463public:
     464
     465    /// \brief
     466    /// Determines in the B-Spline is a polynomial spline
     467    ///
     468    /// \return
     469    /// Returns true if the Spline is polynomial, otherwise false
     470    ///
     471    virtual bool GetIsPolynomial() const = 0;
     472
     473    /// \brief
     474    /// Gets the knot type of the B-Spline
     475    ///
     476    /// \return
     477    /// Returns the knot type as an FdoGeometricKnotType enumeration
     478    ///
     479    virtual FdoGeometricKnotType GetKnotType() const = 0;
     480   
     481    /// \brief
     482    /// Gets the collection of knots associated to this Spline Geometry.
     483    ///
     484    /// \return
     485    /// Returns the collection of knots associated to the spline
     486    ///
     487    virtual FdoBSplineKnotCollection const* GetKnots() const = 0;
     488
     489    /// \brief
     490    /// Gets the number of knots associated to this Spline geometry.
     491    ///
     492    /// \return
     493    /// Returns the knot count
     494    ///
     495    virtual FdoInt32 GetKnotCount() const = 0;
     496
     497    /// \brief
     498    /// Gets a knot at the specified (zero-based) index.
     499    ///
     500    /// \param index
     501    /// Input Zero-based index in the Spline's list of knots.
     502    ///
     503    /// \return
     504    /// Returns the knot at the specified index
     505    ///
     506    virtual FdoIBSplineKnot const* GetKnot(FdoInt32 index) const = 0;
     507
     508    /// \brief
     509    /// Gets the knot at the specified (zero-based) index, by values of
     510    /// its member data. This is in aid of higher performance for any
     511    /// implementation that does not internally use knot objects for storage,
     512    /// or for an application seeking to avoid overhead of accessor methods.
     513    ///
     514    /// \param index
     515    /// Input Zero-based index in the object's list of control positions.
     516    /// \param value
     517    /// Output knot value.
     518    /// \param weight
     519    /// Output knot weight.
     520    /// \param multiplicity
     521    /// Output the mutiplicity of the knot.
     522    ///
     523    /// \return
     524    /// Returns nothing
     525    ///
     526    virtual void GetKnotByMembers(
     527        FdoInt32 index,
     528        double *value,
     529        double *weight,
     530        FdoInt32 *multiplicity) const = 0;
     531};
     532}}}
     533
     534=== Geometry Factory ===
     535
     536{{{
     537/// \brief
     538/// 
     539/// The FdoGeometryFactoryAbstract class is a factory (abstract, non-pure)
     540/// for Geometry objects and Geometry helper objects.
     541///
     542class FdoGeometryFactoryAbstract : public FdoIDisposable
     543{
     544public:
     545
     546
     547
     548    /// EllipticalArcSegment
     549
     550    /// \brief
     551    /// Creates a EllipticalArcSegment object by specifying three
     552    /// points on the arc, and the two focal positions.
     553    ///
     554    /// \param startPosition
     555    /// Input starting position of the ellipse
     556    /// \param midPosition
     557    /// Input a position on the ellipse, and not equal to the starting
     558    /// or ending positions
     559    /// \param endPosition
     560    /// Input ending position of the ellipse
     561    /// \param focalPoisition1
     562    /// Input the first focal position of the ellipse
     563    /// \param focalPoisition2
     564    /// Input the second focal position of the ellipse
     565    ///
     566    /// \return
     567    /// Returns an EllipticalArc Segment
     568    ///
     569    virtual FdoIEllipticalArcSegment* CreateEllipticalArcSegment(
     570        FdoIDirectPosition* startPosition,
     571        FdoIDirectPosition* midPosition,
     572        FdoIDirectPosition* endPosition,
     573        FdoIDirectPosition* focalPoisition1,
     574        FdoIDirectPosition* focalPoisition2) = 0;
     575
     576    /// CircleSegment
     577
     578    /// \brief
     579    ///  Creates a CircleSegment object using three points on the circle.
     580    ///
     581    /// \param firstPosition
     582    /// Input first position of the circle
     583    /// \param secondPosition
     584    /// Input a position on the circle, and not equal to the first or third positions
     585    /// \param thirdPosition
     586    /// Input third position of the circle
     587    ///
     588    /// \return
     589    /// Returns a CircleSegment
     590    ///
     591    FDO_GEOM_API virtual FdoICircleSegment* CreateCircleSegment(
     592        FdoIDirectPosition* firstPosition,
     593        FdoIDirectPosition* secondPosition,
     594        FdoIDirectPosition* thirdPosition) = 0;
     595
     596    /// SplineSegments
     597
     598    /// \brief
     599    /// Creates a Cubic Spline segment from the start and end tangents,
     600    /// and a set of control positions
     601    ///
     602    /// \param startTangent
     603    /// Input the start tanget of the spline
     604    /// \param endTangent
     605    /// Input the end tanget of the spline
     606    /// \param controlPositions
     607    /// Input the collection of control positions that define the spline
     608    /// \return
     609    /// Returns a Cubic Spline Segment
     610    ///
     611    virtual FdoICubicSplineSegment* CreateCubicSplineSegment(
     612        FdoIDirectPosition* startTangent,
     613        FdoIDirectPosition* endTangent,
     614        FdoDirectPositionCollection* controlPositions) = 0;
     615
     616    /// \brief
     617    /// Creates a B-Spline segment from collections of
     618    /// control positions and knots,
     619    ///
     620    /// \param degree
     621    /// Input the algebraic degree of the basis function.
     622    /// \param controlPositions
     623    /// Input the control positions that will be used to contruct the spline
     624    /// \param knots
     625    /// Input the knots that will be used to contruct the spline
     626    /// \param weights
     627    /// \param knotType
     628    /// Input the knotType to be used to contruct the spline
     629    ///
     630    /// \return
     631    /// Returns a B-Spline Segment
     632    ///
     633    virtual FdoIBSplineSegment* CreateBSplineSegment(
     634        FdoInt32 degree,
     635        FdoDirectPositionCollection* controlPositions,
     636        FdoBSplineKnotCollection* knots,
     637        FdoGeometricKnotType knotType) = 0; /// KnotType: TDB
     638};
     639}}}
    181640
    182641== Implications ==