Subject:
|
Re: A comprehensive LDraw object model
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Sun, 10 Feb 2002 09:52:18 GMT
|
Viewed:
|
535 times
|
| |
| |
"Sproaticus" <jsproat@io.com> schrieb im Newsbeitrag news:GrA7CA.24y@lugnet.com...
> In lugnet.cad.dev, Jeremy H. Sproat writes:
> > If the LDraw community can pool their efforts into providing at least an
> > object model for LDraw parts and functionality,
>
> abstract class LineType - ancestor class for all line-type objects
> + class LineType0 - comment line-type
> + class LineTypeCommand - command line-type
> + abstract class PhysicalLineType - ancestor class for all physically
> mutable line-types
> + class LineType1 - subpart line-type
> + abstract class PrimitiveLineType - ancestor class for all
> line-segment-containing line-types
> + class LineType2 - line segment line-type
> + class LineType3 - triangle line-type
> + class LineType4 - quad line-type
> + class LineType5 - optional line segment line-type
> + class LineTypeNull - blank line-type
Shall this lines be only container classes or shall they have the
working code?
If they have working code, they are heavily depending on the target
system (renderer, filter, etc.), so I can't see the advantage of
unifying them.
Else they are container classes, there have to be wrapper
depending on the intention of the program. In this case we rebuild
the dat-file structure.
> *** LDRAW DAT MANAGEMENT CLASSES ***
> class ColorManager
> class LDrawFile - a container for LineType objects, represents a single datfile
> + class LDrawFileMulti - a container for LDrawFile objects, represents an
> MPD file
A LineType1 contains / is a LDrawFile, so you are splitting the line type 1 into
two similar classes.
> abstract class ModelLoader - ancestor class for all model loaders, model cache
> + class DiskModelLoader - loads datfiles from local storage
> + class HTTPModelLoader - loads datfiles from web repository
> class ModelParser - parses a datfile into its component LineType objects
> *** LDRAW DAT RENDERER CLASSES ***
> abstract class LDrawRenderer - ancestor class for renderers
> + class LDrawRendererOrthographic - renders LDraw.exe style
This should not be declared because it prevents using different libraries
(native code) on different systems. I think that this is highly differing
from the programmer and it's tools.
> *** MATH CLASSES ***
> abstract class MatrixNxN - ancestor class for transformation matrices
> + class Matrix4x4 - a 4x4 transformation matrix
> abstract class VectorN - ancestor class for vectors
> + class Vector3 - a 3-element vector, useful for coordinates, euler angles,
> RGB color values, etc.
> + class Vector4 - a 4-element vector, useful for 4x4 Matrix math,
> quaternions, etc.
Hm, they should be only wrapper classes to underlying native code in the
used language on the used system. The more you specify their working code
the more you can't use local optimizations. And this is a very often used
code on the running program.
Sascha
|
|
Message has 1 Reply: | | Re: A comprehensive LDraw object model
|
| (...) The way I designed my stuff is that the code in the linetype classes manage the objects they contain -- mostly just allocation, serialization and stringification of a matrix or a list of vectors. However, any rendering or parsing behavior is (...) (23 years ago, 10-Feb-02, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: A comprehensive LDraw object model
|
| (...) Here's my first contribution, a rough outline of a class structure. *** LDRAW LINE TYPE CLASSES *** abstract class LineType - ancestor class for all line-type objects + class LineType0 - comment line-type + class LineTypeCommand - command (...) (23 years ago, 9-Feb-02, to lugnet.cad.dev)
|
30 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|