SO3Engine
SCOLEntity.cpp
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
25
34#include "SCOLPack/SO3SCOL.h"
35
36// Scene Graph includes
44
45
55{
56#ifdef SO3_DEBUG
57 MMechostr(MSKDEBUG, "SO3EntityNumOfSubEntities\n");
58#endif
59
60 int obj = MMget(m, 0);
61 if (obj == NIL)
62 {
63 MMset(m, 0, NIL);
64 return 0;
65 }
66
67 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
68 if (node == NULL)
69 {
70 MMset(m, 0, NIL);
71 return 0;
72 }
73
74 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
75 {
76 MMset(m, 0, ITOM(0));
77 return 0;
78 }
79
80 SEntity* curEntity = static_cast<SEntity*> (node);
81 MMset(m, 0, ITOM(curEntity->GetNumSubEntities()));
82 return 0;
83}
84
95{
96#ifdef SO3_DEBUG
97 MMechostr(MSKDEBUG, "SO3EntitySetVisibilityFlags\n");
98#endif
99
100 int flags = MMpull(m);
101 int obj = MMget(m, 0);
102 if (obj == NIL)
103 {
104 MMset(m, 0, NIL);
105 return 0;
106 }
107
108 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
109 if (node == NULL)
110 {
111 MMset(m, 0, NIL);
112 return 0;
113 }
114
115 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
116 {
117 MMechostr(MSKDEBUG, "Not an Entity type");
118 MMset(m, 0, NIL);
119 return 0;
120 }
121 SEntity* curEntity = static_cast<SEntity*> (node);
122
123 // NIL == -1, and -1 = 0xFFFFFFFF for int, so it's ok even with NIL!
124 curEntity->SetVisibilityFlags(MTOI(flags));
125 MMset(m, 0, ITOM(1));
126 return 0;
127}
128
138{
139#ifdef SO3_DEBUG
140 MMechostr(MSKDEBUG, "SO3EntityGetVisibilityFlags\n");
141#endif
142
143 int obj = MMget(m, 0);
144 if (obj == NIL)
145 {
146 MMset(m, 0, NIL);
147 return 0;
148 }
149
150 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
151 if (node == NULL)
152 {
153 MMset(m, 0, NIL);
154 return 0;
155 }
156
157 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
158 {
159 MMset(m, 0, NIL);
160 return 0;
161 }
162
163 SEntity* curEntity = static_cast<SEntity*> (node);
164 MMset(m, 0, ITOM(curEntity->GetVisibilityFlags()));
165 return 0;
166}
167
179{
180#ifdef SO3_DEBUG
181 MMechostr(MSKDEBUG, "SO3EntitySetVisibilityFlagIndexEnable\n");
182#endif
183
184 int enable = MMpull(m);
185 int flagIndex = MMpull(m);
186 int obj = MMget(m, 0);
187 if ((obj == NIL) || (flagIndex == NIL))
188 {
189 MMset(m, 0, NIL);
190 return 0;
191 }
192
193 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
194 if (node == NULL)
195 {
196 MMset(m, 0, NIL);
197 return 0;
198 }
199
200 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
201 {
202 MMechostr(MSKDEBUG, "Not an Entity type");
203 MMset(m, 0, NIL);
204 return 0;
205 }
206
207 try
208 {
209 SEntity* curEntity = static_cast<SEntity*> (node);
210 curEntity->SetVisibilityFlagIndexEnable(MTOI(flagIndex), (MTOI(enable) == 1) ? true : false);
211 MMset(m, 0, ITOM(1));
212 }
213 catch (const SException&)
214 {
215 MMset(m, 0, ITOM(NIL));
216 }
217 return 0;
218}
219
230{
231#ifdef SO3_DEBUG
232 MMechostr(MSKDEBUG, "SO3EntityGetVisibilityFlagIndexEnable\n");
233#endif
234
235 int flagIndex = MMpull(m);
236 int obj = MMget(m, 0);
237 if ((obj == NIL) || (flagIndex == NIL))
238 {
239 MMset(m, 0, NIL);
240 return 0;
241 }
242
243 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
244 if (node == NULL)
245 {
246 MMset(m, 0, NIL);
247 return 0;
248 }
249
250 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
251 {
252 MMset(m, 0, NIL);
253 return 0;
254 }
255 SEntity* curEntity = static_cast<SEntity*> (node);
256
257 try
258 {
259 SEntity* curEntity = static_cast<SEntity*> (node);
260 if (curEntity->GetVisibilityFlagIndexEnable(MTOI(flagIndex)))
261 MMset(m, 0, ITOM(1));
262 else
263 MMset(m, 0, ITOM(0));
264 }
265 catch (const SException&)
266 {
267 MMset(m, 0, ITOM(NIL));
268 }
269 return 0;
270}
271
272
282int SO3EntityGenerateLOD(mmachine m)
283{
284#ifdef SO3_DEBUG
285 MMechostr(MSKDEBUG, "SO3EntityGenerateLOD\n");
286#endif
287
288 int nb = MMpull(m);
289 int obj = MMget(m, 0);
290 if (obj == NIL)
291 {
292 MMset(m, 0, NIL);
293 return 0;
294 }
295
296 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
297 if (node == NULL)
298 {
299 MMset(m, 0, NIL);
300 return 0;
301 }
302
303 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
304 {
305 MMset(m, 0, NIL);
306 return 0;
307 }
308 SEntity* curEntity = static_cast<SEntity*> (node);
309
310 int nbLevels = 0;
311 if (nb != NIL)
312 nbLevels = abs(MTOI(nb));
313
314 try
315 {
316 SEntity* curEntity = static_cast<SEntity*>(node);
317 curEntity->GenerateLOD(nbLevels);
318 MMset(m, 0, ITOM(1));
319 }
320 catch (const SException&)
321 {
322 MMset(m, 0, ITOM(NIL));
323 }
324 return 0;
325}
326
327
338{
339#ifdef SO3_DEBUG
340 MMechostr(MSKDEBUG, "SO3EntityGetMaterialByIndex\n");
341#endif
342
343 int idx = MMpull(m);
344 int obj = MMget(m, 0);
345 if ((obj == NIL) || (idx == NIL) || ((MTOI(idx)) < 0))
346 {
347 MMset(m, 0, NIL);
348 return 0;
349 }
350
351 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
352 if (node == NULL)
353 {
354 MMset(m, 0, NIL);
355 return 0;
356 }
357
358 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
359 {
360 MMset(m, 0, NIL);
361 return 0;
362 }
363
364 unsigned int uidx = MTOI(idx);
365
366 SEntity* curEntity = static_cast<SEntity*> (node);
367 if (!curEntity->getOgreEntityPointer() || uidx >= curEntity->GetNumSubEntities())
368 {
369 MMset(m, 0, NIL);
370 return 0;
371 }
372
373 SMaterial* tmpMat = curEntity->GetParentScene()->GetMaterial(curEntity->GetGroupName(), curEntity->getOgreEntityPointer()->getSubEntity(uidx)->getMaterial()->getName());
374 if (tmpMat == 0)
375 {
376 MMset(m, 0, NIL);
377 return 0;
378 }
379
380 //remove last param
381 MMpull(m);
382 return createOrRetrieveScolMaterialAndSendToVM(m, curEntity->GetParentScene(), tmpMat);
383}
384
385
395{
396#ifdef SO3_DEBUG
397 MMechostr(MSKDEBUG, "SO3EntityMaterialList\n");
398#endif
399
400 int ent = MMget(m, 0);
401 if (ent == NIL)
402 {
403 MMechostr(MSKDEBUG, "Entity is NULL\n");
404 MMset(m, 0, NIL);
405 return 0;
406 }
407
408 SNode* node = MMgetPointer<SNode*>(m, MTOP(ent));
409 if (node == NULL)
410 {
411 MMset(m, 0, NIL);
412 return 0;
413 }
414
415 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
416 {
417 MMset(m, 0, NIL);
418 return 0;
419 }
420
421 SEntity* entity = static_cast<SEntity*>(node);
422 if (!entity || !entity->getOgreEntityPointer())
423 {
424 MMset(m, 0, NIL);
425 return 0;
426 }
427
428 //TODO in SEntity
429 // Getting Materials
430 int nbMat = entity->GetNumSubEntities();
431 int k;
432 int tmp_res, n = 0;
433 for (int i = 0; i < nbMat; i++)
434 {
435 SMaterial* material = node->GetParentScene()->GetMaterial(entity->GetGroupName(), entity->getOgreEntityPointer()->getSubEntity(i)->getMaterial()->getName());
436 if (material == NULL)
437 {
438 MMset(m, 0, NIL);
439 return 0;
440 }
441
442 createOrRetrieveScolMaterialAndSendToVM(m, node->GetParentScene(), material);
443 INVERT(m, 0, 1);
444 n++;
445 }
446
447 MMpull(m);
448 if (MMpush(m, NIL))
449 return MERRMEM;
450
451 for (int j = 0; j < n; j++)
452 {
453 if (MMpush(m, 2 * 2))
454 return MERRMEM;
455
456 if (k = MBdeftab(m))
457 return k;
458 }
459 return 0;
460}
461
462
473{
474#ifdef SO3_DEBUG
475 MMechostr(MSKDEBUG, "SO3EntityAttachSkeleton\n");
476#endif
477
478 int p = MMpull(m);
479 int ent = MMpull(m);
480
481 if ((p == NIL) || (ent == NIL))
482 {
483 MMpush(m, NIL);
484 return 0;
485 }
486
487 SNode* node = MMgetPointer<SNode*>(m, MTOP(ent));
488 if (node == NULL)
489 {
490 MMpush(m, NIL);
491 return 0;
492 }
493
494 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
495 {
496 MMpush(m, NIL);
497 return 0;
498 }
499
500 SEntity* entity = static_cast<SEntity*> (node);
501 if (!entity || !entity->getOgreEntityPointer())
502 {
503 MMpush(m, NIL);
504 return 0;
505 }
506
507 SScene* scene = entity->GetParentScene();
508 string pathStd = MMstartstr(m, MTOP(p));
509
510 for (unsigned int i = 0; i < pathStd.length(); i++)
511 {
512 if (pathStd.substr(i, 1) == "\\")
513 pathStd.replace(i, 1, "/");
514 }
515
516 try
517 {
518 Ogre::SkeletonPtr sklptr = (Ogre::SkeletonPtr)scene->O3SkeletonManager->getByName(pathStd, entity->GetGroupName());
519 if (sklptr && !sklptr->getRootBones().empty())
520 {
521 //get existing skeleton and set on mesh
522 if (entity->getOgreEntityPointer()->getMesh()->getSkeleton() != sklptr)
523 {
524 entity->getOgreEntityPointer()->getMesh()->setSkeletonName(pathStd);
525 entity->getOgreEntityPointer()->getMesh()->_notifySkeleton(sklptr);
526 }
527
528 // reset mesh to apply new skeleton
529 Ogre::Entity* ogreEntity = entity->getOgreEntityPointer();
530 ogreEntity->_initialise(true);
531 entity->Reload();
532 }
533 else if (!sklptr)
534 {
535 //load skeleton and set on mesh
536 if (entity->getOgreEntityPointer()->getMesh()->getSkeletonName() != pathStd)
537 {
538 entity->getOgreEntityPointer()->getMesh()->setSkeletonName(pathStd);
539
540 // reset mesh to apply new skeleton
541 Ogre::Entity* ogreEntity = entity->getOgreEntityPointer();
542 ogreEntity->_initialise(true);
543 entity->Reload();
544 }
545 }
546
547 /* TODO: Anims are handled differently now, not sure it's still useful...
548 if(entity->getOgreEntityPointer()->hasVertexAnimation())
549 {
550 // Loading SCOL Animation
551 // refresh all existing too
552 for(int i=0;i<entity->getOgreEntityPointer()->getMesh()->getNumAnimations();i++)
553 {
554 Ogre::Animation* oanim = entity->getOgreEntityPointer()->getMesh()->getAnimation(i);
555
556 // get all animations from list by entity and by type
557 SAnim* anim = NULL;
558
559 GetAnimByName(scene, &anim, node, entity->getOgreEntityPointer()->getName()+"."+oanim->getName());
560 if(anim == NULL)
561 {
562 anim = new SVertexAnimation(oanim->getName(), entity, i);
563
564 // Create AnimationState for each anim
565 scene->listOfAnim.insert(SAnimMap::value_type(entity->getOgreEntityPointer()->getName()+"."+oanim->getName(), anim));
566 int a = createAnim(m,anim,(SNode*)entity);
567 Ogre::Animation::VertexTrackIterator it = anim->getOgreAnimationPointer()->getVertexTrackIterator();
568 while(it.hasMoreElements())
569 {
570 Ogre::VertexAnimationTrack* myTrack = static_cast <Ogre::VertexAnimationTrack*> (it.getNext());
571 SAnimTrack* animationTrack = new SAnimTrack("TODO JEFF", anim, myTrack);
572 anim->listOfAnimationTrack.insert(SAnimTrackMap::value_type("TODO JEFF", animationTrack));
573 int at = createAnimTrack(m, animationTrack, anim);
574 }
575 }
576 else
577 {
578 anim->setOgreAnimationPointer(oanim);
579 //TODO update tracks
580 }
581 }
582 }*/
583
584 // Create skeleton
585 string tmpSkeletonName = entity->GetName() + "." + pathStd;
586 SSkeleton* newSkeleton = scene->CreateSkeleton(tmpSkeletonName, entity);
587
588 // Create Scol Bones Object from skeleton SBone.
589 SBoneMap bonesListCopy = newSkeleton->GetBones();
590 SBoneMap::iterator iBone = bonesListCopy.begin();
591 while (iBone != bonesListCopy.end())
592 {
593 SBone* newBone = iBone->second;
594 assert(newBone != 0);
595
596 createBone(m, (SNode*)newBone, scene, entity);
597 //restore the stak state
598 MMpull(m);
599
600 iBone++;
601 }
602
603 // Create Scol Animations Object from skeleton SAnim.
604 const SAnimMap animations = newSkeleton->GetAnimations();
605 SAnimMap::const_iterator iAnimation = animations.begin();
606 while (iAnimation != animations.end())
607 {
608 SAnim* newAnimation = iAnimation->second;
609 assert(newAnimation != 0);
610 createAnim(m, newAnimation, entity);
611
612 const SAnimTrackList animationsTracksList = newAnimation->GetAnimationsTracks();
613 SAnimTrackList::const_iterator iAnimationTrack = animationsTracksList.begin();
614 while (iAnimationTrack != animationsTracksList.end())
615 {
616 SAnimTrack* newAnimationTrack = (*iAnimationTrack);
617 assert(newAnimationTrack != 0);
618 createAnimTrack(m, newAnimationTrack, newAnimation);
619 //restore the stak state
620 MMpull(m);
621
622 iAnimationTrack++;
623 }
624 //restore the stak state
625 MMpull(m);
626 iAnimation++;
627 }
628
629 // push the result on stack
630 MMpush(m, ent);
631 return 0;
632 }
633 catch (Ogre::Exception &e)
634 {
635 MMechostr(MSKDEBUG, "An exception has occurred: %s\n", e.what());
636 MMpush(m, NIL);
637 return 0;
638 }
639}
640
641
650int SO3EntityGetSkeleton(mmachine m)
651{
652#ifdef SO3_DEBUG
653 MMechostr(MSKDEBUG, "SO3EntityGetSkeleton\n");
654#endif
655
656 int ent = MMpull(m);
657
658 if (ent == NIL)
659 {
660 MMpush(m, NIL);
661 return 0;
662 }
663
664 SNode* node = MMgetPointer<SNode*>(m, MTOP(ent));
665 if (node == NULL)
666 {
667 MMpush(m, NIL);
668 return 0;
669 }
670
671 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
672 {
673 MMpush(m, NIL);
674 return 0;
675 }
676
677 SEntity* entity = static_cast<SEntity*> (node);
678 if (!entity || !entity->getOgreEntityPointer() || !entity->GetSkeleton())
679 {
680 MMpush(m, NIL);
681 return 0;
682 }
683
684 string pathStd = entity->GetSkeleton()->GetOgreSkeletonPointer()->getName();
685
686 // push the result on stack
687 Mpushstrbloc(m, (char*)pathStd.c_str());
688 return 0;
689}
690
701int SO3EntitySetMaterial(mmachine m)
702{
703#ifdef SO3_DEBUG
704 MMechostr(MSKDEBUG, "SO3EntitySetMaterial\n");
705#endif
706
707 int index = MMpull(m);
708 int mat = MMpull(m);
709 int ent = MMget(m, 0);
710 if ((ent == NIL) || (mat == NIL))
711 {
712 MMset(m, 0, NIL);
713 return 0;
714 }
715
716 SMaterial* material = MMgetPointer<SMaterial*>(m, MTOP(mat));
717 if (material == NULL)
718 {
719 MMset(m, 0, NIL);
720 return 0;
721 }
722
723 SNode* mNode = MMgetPointer<SNode*>(m, MTOP(ent));
724 if (mNode->GetNodeType() != SNode::ENTITY_TYPE_ID)
725 {
726 MMset(m, 0, NIL);
727 return 0;
728 }
729 SEntity* entity = static_cast <SEntity*> (mNode);
730 if (!entity)
731 {
732 MMset(m, 0, NIL);
733 return 0;
734 }
735
736 if (entity->SetMaterial(material, MTOI(index)))
737 MMset(m, 0, ITOM(1));
738 else
739 MMset(m, 0, NIL);
740 return 0;
741}
742
753{
754#ifdef SO3_DEBUG
755 MMechostr(MSKDEBUG, "SO3EntityGetResourceGroup\n");
756#endif
757
758 int ent = MMget(m, 0);
759 if (ent == NIL)
760 {
761 MMset(m, 0, NIL);
762 return 0;
763 }
764
765 SNode* mNode = MMgetPointer<SNode*>(m, MTOP(ent));
766 if (mNode->GetNodeType() != SNode::ENTITY_TYPE_ID)
767 {
768 MMset(m, 0, NIL);
769 return 0;
770 }
771
772 SEntity* entity = static_cast <SEntity*> (mNode);
773 if (!entity || !entity->getOgreEntityPointer())
774 {
775 MMset(m, 0, NIL);
776 return 0;
777 }
778
779 MMpull(m);
780 std::string group = entity->GetGroupName();
781 group = group.substr(entity->GetParentScene()->GetName().length());
782 Mpushstrbloc(m, (char*)group.c_str());
783 return 0;
784}
785
786
787
798{
799#ifdef SO3_DEBUG
800 MMechostr(MSKDEBUG, "SO3EntitySetMinPixelSize\n");
801#endif
802
803 int imsize = MMpull(m);
804 int obj = MMget(m, 0);
805 if (obj == NIL)
806 {
807 MMset(m, 0, NIL);
808 return 0;
809 }
810
811 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
812 if (node == NULL)
813 {
814 MMset(m, 0, NIL);
815 return 0;
816 }
817
818 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
819 {
820 MMechostr(MSKDEBUG, "Not an Entity type");
821 MMset(m, 0, NIL);
822 return 0;
823 }
824 SEntity* curEntity = static_cast<SEntity*> (node);
825
826 float msize = 0.0f;
827 if (imsize != NIL)
828 msize = MTOF(imsize);
829
830 curEntity->SetMinPixelSize(msize);
831
832 MMset(m, 0, ITOM(1));
833 return 0;
834}
835
845{
846#ifdef SO3_DEBUG
847 MMechostr(MSKDEBUG, "SO3EntityGetMinPixelSize\n");
848#endif
849
850 int obj = MMget(m, 0);
851 if (obj == NIL)
852 {
853 MMset(m, 0, NIL);
854 return 0;
855 }
856
857 SNode* node = MMgetPointer<SNode*>(m, MTOP(obj));
858 if (node == NULL)
859 {
860 MMset(m, 0, NIL);
861 return 0;
862 }
863
864 if (node->GetNodeType() != SNode::ENTITY_TYPE_ID)
865 {
866 MMset(m, 0, NIL);
867 return 0;
868 }
869
870 SEntity* curEntity = static_cast<SEntity*> (node);
871 MMset(m, 0, FTOM(curEntity->GetMinPixelSize()));
872 return 0;
873}
874
875NativeDefinition natSO3Entity[] = {
876 { "SO3EntityNumOfSubEntities", 1, "fun [SO3_OBJECT] I", SO3EntityNumOfSubEntities },
877 { "SO3EntityGetMaterialByIndex", 2, "fun [SO3_OBJECT I] SO3_MATERIAL", SO3EntityGetMaterialByIndex },
878 { "SO3EntityMaterialList", 1, "fun [SO3_OBJECT] [SO3_MATERIAL r1]", SO3EntityMaterialList },
879 { "SO3EntityAttachSkeleton", 2, "fun [SO3_OBJECT P] SO3_OBJECT", SO3EntityAttachSkeleton },
880 { "SO3EntityGetSkeleton", 1, "fun [SO3_OBJECT] P", SO3EntityGetSkeleton },
881 { "SO3EntitySetMaterial", 3, "fun [SO3_OBJECT SO3_MATERIAL I] I", SO3EntitySetMaterial },
882 { "SO3EntityGetResourceGroup", 1, "fun [SO3_OBJECT] S", SO3EntityGetResourceGroup },
883 { "SO3EntitySetVisibilityFlags", 2, "fun [SO3_OBJECT I] I", SO3EntitySetVisibilityFlags },
884 { "SO3EntityGetVisibilityFlags", 1, "fun [SO3_OBJECT] I", SO3EntityGetVisibilityFlags },
885 { "SO3EntitySetVisibilityFlagIndexEnable", 3, "fun [SO3_OBJECT I I] I", SO3EntitySetVisibilityFlagIndexEnable },
886 { "SO3EntityGetVisibilityFlagIndexEnable", 2, "fun [SO3_OBJECT I] I", SO3EntityGetVisibilityFlagIndexEnable },
887 { "SO3EntityGenerateLOD", 2, "fun [SO3_OBJECT I] I", SO3EntityGenerateLOD },
888 { "SO3EntitySetMinPixelSize", 2, "fun [SO3_OBJECT F] I", SO3EntitySetMinPixelSize },
889 { "SO3EntityGetMinPixelSize", 1, "fun [SO3_OBJECT] F", SO3EntityGetMinPixelSize }
890};
891
892
898int SCOLloadEntity(mmachine m, cbmachine w)
899{
900 return PKhardpak2(m, "SO3Entity.pkg", sizeof(natSO3Entity) / sizeof(natSO3Entity[0]), natSO3Entity);
901}
902
903
909{
910 return 0;
911}
int SCOLfreeEntity()
free the SO3Engine Entity function
NativeDefinition natSO3Entity[]
int SCOLloadEntity(mmachine m, cbmachine w)
Load the SO3Engine Entity function.
MMechostr(MSKDEBUG, " > Start loading Plugin SO3Engine dll\n")
SCOL_EXPORT int cbmachine w
Definition SO3SCOL.cpp:5150
int createAnimTrack(mmachine m, SAnimTrack *curAnimTrack, SAnim *curAnim)
int createAnim(mmachine m, SAnim *curAnim, SNode *curNode)
int createOrRetrieveScolMaterialAndSendToVM(mmachine m, SScene *scene, SMaterial *mat)
int createBone(mmachine m, SNode *curNode, SScene *curScene, SNode *curFather)
int SO3EntityGetMaterialByIndex(mmachine m)
SO3EntityGetMaterialByIndex : Return the material associated with a given subEntity for a given node.
int SO3EntitySetMinPixelSize(mmachine m)
SO3EntitySetMinPixelSize : Set the visibility minmum pixel size.
int SO3EntityMaterialList(mmachine m)
SO3EntityMaterialList : return the list of material applied on an Entity.
int SO3EntitySetMaterial(mmachine m)
SO3EntitySetMaterial : Set a material on Entity.
int SO3EntityGetMinPixelSize(mmachine m)
SO3EntityGetMinPixelSize : Get the visibility minimum pixel size.
int SO3EntityNumOfSubEntities(mmachine m)
main include
int SO3EntityGetVisibilityFlagIndexEnable(mmachine m)
SO3EntityGetVisibilityFlagIndexEnable : Retrieve if the visibility flag at the given index is enabled...
int SO3EntityAttachSkeleton(mmachine m)
SO3EntityAttachSkeleton : Load a skeleton resource in Scene.
int SO3EntitySetVisibilityFlags(mmachine m)
SO3EntitySetVisibilityFlags : Set the visibility flags corresponding to viewports masks.
int SO3EntityGetVisibilityFlags(mmachine m)
SO3EntityGetVisibilityFlags : Get the visibility flags corresponding to viewports masks.
int SO3EntitySetVisibilityFlagIndexEnable(mmachine m)
SO3EntitySetVisibilityFlagIndexEnable : Set the visibility flag at the given index (do not change oth...
int SO3EntityGetSkeleton(mmachine m)
SO3EntityGetSkeleton : Get a skeleton resource from the entity.
int SO3EntityGetResourceGroup(mmachine m)
SO3EntityGetResourceGroup : Get the resource group of an Entity.
int SO3EntityGenerateLOD(mmachine m)
SO3EntityGenerateLOD : Generate LOD on an entity.
STBI_EXTERN unsigned long flags
Definition stb_image.h:1182