/ / / \
/ _____/ ______ / \
/ /____ / / / |
/ / / / / /
/________/ /_____/ /________/
catalyst of design
|talsit : code, dzn : email@example.com
|openGL stuff - openGL1.2 minimun please, tested on
|pIII@550+384mb+nVidia geForce2GTS and runs great.
|geForce2 class card (or better) is recomended.
|pIII class CPU (or better) is recomended.
|128mb ram at least.
|email : firstname.lastname@example.org
|url : http://talsit.org/CoD
|It started a long time ago, way over a year ago. caosGL
|is the name of my demosystem, and it started it's actual
|re-encarnation on the 18th of jan, 2001. caosGL stands
|for Computer Animation Operating System Graphics Library
|which is a load of bullshit except that is sounds nice,
|which is what really counts.
|It is the complete source code to all caosGL. It includes
|the maya plug in to export the .caos files, all the code
|classes, a consoleLoader/tester and the caosGLoader.
|In the source files, there should be the relevant credits
|where due. Also, don't expect many comments.
|There is a license in ever file, should you not find it
|You may do with this as you please.
|Notes about this:
| -the zip loader *should* work, but it sometimes doesn't,
| though i don't know why, it's probably something i did
| to it.
| -log4cpp rocks, included is a slightly modified version
| of the 0.2.2, which basically allows you to add as many
| appenders as you wish, if you don't know what i'm
| saying, well here's a little explination: log4cpp is
| a logging system, it allows you to put in logging
| statements easily and in a very flexible manner, and
| then, at run time, specify what level logging to do,
| where to output (stdout, file, nt event system, unix
| logsys, etc,etc), without modifying the code. Trust
| me, it's cool!
| -the maya exporter is the worst thing i have ever
| written. i am very, very, very ashamed of it. but
| it seems to work great. to use it, you need to modify
| and load exportCaos-II.mel included somewhere. that
| script loads and unloads the plugin on every export,
| so you can recompile the plugin at anytime.
| -the xml scripts are all compliant to caosGL.dtd. if
| you want, always check the scripts against the dtd,
| by running them through a validating parse, tinyxml
| doesn't validate (it's tiny, what would you expect!)
| -the animation curves (cAnimCurve) are the same that
| maya uses, so any animation that maya creates, it
| should be played back flawlessly by caosGL. i made
| an exporter to export curves straight to xml, but
| it's very lame and extremely useless, so i didn't
| include it.
|Now to how the system actually works! Everything
|extends from cBaseNode. It has a few staight forward
|methods, like set, get, name, getTypeName,
|getAttributeNames, visit, leave and a few others.
|Internally, the attributes are referenced by flis
|(four-letter identifiers) which is just an int (int fli
|= 'rotX'; // yes, single quotes!), which makes for fast
|construction, and even faster evaluation - if i had
|implemented it properly with a switch case statement (i
|didn't think of it until i was too late) - this is
|thanks to jare!
|NEW in v1.1!: This has been redone totally, it is
|now consitent all through caosGL, and works great,
|using the switch case statement and booleans for returns
|instead of slow strings.
|The newer clases implement the attribute things
|automatically (cImageElement for example), there is a
|corresponding .attribs file describing the attributes,
|and the preprocessor will include the necesarry
|reference to them in the appropiate places, you just
|need to add them in the .attribs file, and then use
|them. One thing about using them, if you create an
|attrib called 'rotX', the preprocessor will put an
|underscore before it, so you will use it like this:
|_rotX = 5;
|The script system will be in charge of assigning the
|attributes at load time, so if in the xml file you
|specify some parameters, those attributes will be set.
|There are 2 set methods one that recieves a string, and
|the other recieves a double. This is done for
|Now to the object creation. Objects are created via the
|registry (cRegistry). I is implemented through
|templates. At the botton of each non-abstract node
|class (cLayer, for example), you will see a new class
|created, calles XXXXNodeCreater, which inherits from
|cNodeCreator. In it will create an instance of you
|choice of class and return it. And straight below that,
|a static templated instance of cRegisterNodeCreator is
|created. Now, what all this does is register with
|cRegistry a new creator node for creating a class. And
|all this is done automatically, without modifying
|anything. So, to add a new node class, just copy an
|existing one, replace the names, and off you go. This
|also eliminates the need for an include file for a lot
|of the nodes. All the effects are subclasses of cScene
|(which is just a subclass of cBaseNode and the
|interface iDrawable), and none of them have an include
|file - because it doesn't need it!
|All this leads to the fact that cRegistry can create a
|node just by knowing its name, and you can set its
|attributes just by knowing it's fli. There is a tester
|program (in the consoleTester project) which will
|output all the registered nodes, and all its flis.
|This also leads to an extremely easy way of creating
|exporters and consoles, which can modify the objects at
|runtime. cRegistry keeps a list of all the nodes
|created, and you can ask it for an existing object, and
|set it's attributes easily, or get them just as easily.
|The system is a hierachical one, you have a tree
|structure. Only subclasses of cGroup can be root nodes,
|all the rest are added to it. You can also add cGroup
|to a cGroup. When the tree is traversed, the visit
|method will be called, if if returns false, the
|traverse will not descend down the tree, and will move
|on to the next sibling. That what you can group lots of
|things into cLayers (a subclass of cGroup) and say that
|that layer is only active from this time to that time.
|That will save a lot of time in the traverse. If the
|visit method returns true, the cSceneGraph will
|determine if it's a iDrawable, if so, it will call the
|update method, then the draw method. Then it will
|determine if it's a cGroup, and if so, will descend
|down the tree recursively. Then it will call the leave
|method. This is usefull for state or matrix changes,
|for example cTranspose (shit name), when the visit
|method is called, it will do a glPushMatrix, then apply
|the transformations and when the leave method is
|called, it will do a glPopMatrix. When the visit method
|is called, at the cBaseNode level, the animation curves
|will be evaluated and the attributes sets. Texture
|managment. Only jpg images are supported at the moment
|(who needs more?). You get the textures like so:
|cTextureSpace::instance ()->get ("some"); I can be a
|file or just a symbolic name. If it doesn't exist as a
|file, it will create an empty, symbolic texture for you
|to use where ever. This is used in the cRenderToTexture
|class, where a symolic texture is created, drawn on,
|then is used by some other class getting the texture
|with the same name. Flexible, huh?
|Can't think of anything else, really. If you have any
|questions, just ask. (Menuda chapa, eh?)
|Thank you to all those people and things that made it
|visualc++, openGL, stl, bass, tinyxml, zip(Jare),
|nehe tutorial, osg(example), tesla(jpgLoading),
|Thank you to all those who inspired me:
|3pixels, addict, anaconda, asd, calodox, centosis,
|chanka, concept, disaster area, exceed, farbraush,
|future crew, fuzzion, glue, hansa, haujobb, iguana,
|mfx, orion, purple, rgba, satori, savage, solstice,
|stravaganza, sunflower, tbl, tdr, threestate, tlotb,
|tpolm, unknown, zonan.
|And of course, thanks to all those that I shamelessly
|v1.0 Initial public release
| contains all the essential goodies.
|v1.1 Internal rewrite for consistency.
| Removed heaps of namespaces, now there are only 3:
| caosGL::core - all the internal stuff, IO, synch
| window setup, music, etc, etc...
| caosGL::gfx - gfx related stuff, the scene graph,
| jpg loading, base nodes.
| caosGL::effects - effects galore!
| Known bugs: (i'm sure there are more)
| - Zip reader works when it wants to, dunno why, don't
| care really, going to switch to rar lib for next
| release anyway.
| - animation curves sometimes jumps, but it does so
| consistently, ei, it's repeatable, not random.
|tALSit de CoD :: founder
| :: coder
| :: gfx (maya+2d)
| :: dzn
|Bored Ball :: a 3d animation
| :: 22nd of july, 2000
| :: euskal party 8 :: 2nd place
|Leave Me Alone! :: a 3d animation
| :: 28th of july, 2001
| :: euskal party 9 :: 9th place
|Monkey Lover :: a demo
| :: 7th of may, 2002
|caosGLv1.0 :: a demosystem
| :: 8th of may, 2002
|caosGLv1.1 :: a demosystem
| :: 23th of may, 2002
|there is no license, only rules.
| -you are allowed to distribute this only by
| electronical form, you may not charge anything for it
| either in monetary value or in exchange for another
| product or service.
| -this is free software, you will not be charged for it
| nor will you charge for it. you may not use this program
| to promote anything except "the scene".
| -if you execute this software, you do so by your own
| free will (fatalists spare me), and therefore, if any
| damages occur, the author will by no account be held
| -there are things that are not mine (libjpeg, zlib, etc)
| of course, those remain the property of the author, and
| should state so in those sources, if not, email me, and
| i'll fix it.
| -this file must always accompany the software verbatim.
| -you shall enjoy it.