Commit graph

249 commits

Author SHA1 Message Date
Stephen Birarda
53e6a77fcc cleanup EncodeBitstreamParams to use nodeData when possible 2017-03-24 13:41:36 -07:00
Stephen Birarda
b08bfe93f4 change lastViewFrustumSent to lastQuerySent 2017-01-18 14:58:36 -08:00
Seth Alves
6fe35ac0da use smart pointers to avoid leaking EntityTreeElementExtraEncodeData 2016-12-12 16:04:41 -08:00
Seth Alves
844cc03dcb fix names of model-entity joint setters 2016-11-02 10:24:01 -07:00
Andrew Meadows
3b772d2fe6 fallback to SIMPLE_COMPOUND when can't do COMPOUND 2016-08-24 22:26:56 -07:00
Andrew Meadows
8009d23f70 more STATIC_MESH and dynamic overlap prevention 2016-06-22 15:20:45 -07:00
Atlante45
38f74c1843 Remove the last of the glow level 2016-05-14 14:49:31 -07:00
Brad Hefta-Gaub
91334d6a39 Merge pull request #7664 from ZappoMan/reduceJointProperties
only export joint values if they've been explicitly set by scripts
2016-04-14 15:30:04 -07:00
Brad Hefta-Gaub
b48503a82d only export joint values if they've been explicitly set by scripts 2016-04-13 19:52:50 -07:00
Zach Pomerantz
7a15339631 Use AnimationCache for models 2016-04-13 15:44:47 -07:00
Zach Pomerantz
54b8a9278d Guard model texs 2016-03-30 14:11:45 -07:00
Andrew Meadows
6eb177091b overhaul of MotionState cleanup
Moved MotionState deletes out of PhysicsEngine.
EntityMotionStates are deleted by the PhysicsEntitySimulation.
AvatarMotionStates are deleted in the Avatar dtor.
2016-01-07 10:19:46 -08:00
Seth Alves
c9ed36f9a6 include joint data in script properties 2016-01-04 12:31:45 -08:00
Seth Alves
83f60d6e97 make entity properties for model-entity joint-states 2015-12-23 15:43:50 -08:00
Anthony J. Thibault
3b1ba67a88 ModelEntityItem: Fix for incorrect animations with preTranslations
ModelEntities that were playing animations on models with local pivot offsets were not working correctly.
Specifically, the windmill animation in the demo domain.

We now compose a matrix containing all of the FBX's preTranslation, preRotation and postTranformations.
2015-12-16 17:08:22 -08:00
Anthony J. Thibault
617fda7832 ModelEntityItem: fix for incorrect joint mapping
This could happen when switching the animation url between fbx files
with different joint mappings.  Only the first one would take effect.

This should fix the issue in the demo domain, with the contorted doll model.
2015-12-14 17:07:53 -08:00
Anthony J. Thibault
e9f529bf12 Entities: Removed Start Automatically property from Animation Group
There is an issue when startAutomatically was set to true and animationPlaying was set to false.
This would cause clients to play the animation when they connected to the entity server, even though the server was not.
2015-12-09 17:59:56 -08:00
Seth Alves
b7ebe5b92b merge from upstream 2015-11-30 16:59:52 -08:00
Anthony J. Thibault
dd3f43705c Fix for Model Entity animations.
Because rig->setJoint* methods take parameters in geometry space
the animations preRotation has to be applied manually.
2015-11-23 11:06:11 -08:00
Seth Alves
61269c3ce8 fix up entity constructors so that setProperties isn't called during the constructor 2015-10-23 13:52:50 -07:00
Andrew Meadows
fa17b77d70 move DIRTY_FLAGS out of EntityItem namespace 2015-10-15 09:34:09 -07:00
Atlante45
bcd148cb87 Construct entity properties at definition 2015-10-09 12:23:19 -07:00
Brad Hefta-Gaub
7a85e5b7a7 rename frameIndex to currentFrame 2015-10-07 13:02:58 -07:00
Brad Hefta-Gaub
57cc7adbfe standardize somethingChanged - CR feedback 2015-10-07 12:27:12 -07:00
Brad Hefta-Gaub
016bf4011d cleanup 2015-10-06 16:07:36 -07:00
Brad Hefta-Gaub
1319642a59 fix frame jumping behavior on restart 2015-10-06 15:59:35 -07:00
Brad Hefta-Gaub
f30a94064f make animation start/stop work 2015-10-05 15:50:55 -07:00
Brad Hefta-Gaub
8c8e83dc8e more debugging on animation.running 2015-10-05 14:17:12 -07:00
Brad Hefta-Gaub
abdd9a6da4 Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings 2015-10-02 17:28:06 -07:00
Brad Hefta-Gaub
eb9078bda5 cleanup 2015-10-02 17:27:45 -07:00
Brad Hefta-Gaub
68dc303603 remove debug 2015-10-02 17:12:03 -07:00
Brad Hefta-Gaub
f618a2adfa gak - get streaming working again 2015-10-02 17:06:32 -07:00
Howard Stearns
8153ad7f44 Merge pull request #5967 from AndrewMeadows/collision-group-hack
allow physical objects to be set collisionless
2015-10-02 16:08:52 -07:00
Brad Hefta-Gaub
57bf69cc48 Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings
Conflicts:
	libraries/entities/src/ModelEntityItem.cpp
	libraries/networking/src/udt/PacketHeaders.cpp
2015-10-02 14:19:15 -07:00
Brad Hefta-Gaub
cf2693e712 working fistFrame lastFrame 2015-10-02 08:31:22 -07:00
Brad Hefta-Gaub
815c4c69af support for legacy properties 2015-10-01 14:52:28 -07:00
Brad Hefta-Gaub
91a27e3adf get animation to actually run again 2015-10-01 13:29:07 -07:00
Brad Hefta-Gaub
aca25bd76e connect up AnimationPropertyGroup to AnimationLoop 2015-10-01 11:05:16 -07:00
Andrew Meadows
381c98c4fa fix for ModelEntityItem::shouldBePhysical() 2015-10-01 08:56:05 -07:00
Brad Hefta-Gaub
7c14f9ab93 Merge branch 'animationGroupSettings' of https://github.com/ZappoMan/hifi into animationGroupSettings 2015-09-30 21:46:28 -07:00
Brad Hefta-Gaub
6aa9ef9910 first cut at migrating animation settings into a property group 2015-09-30 20:51:25 -07:00
Seth Alves
50dd8eba45 Relay joint translations across network. Apply animation's root-joint translation to avatar. 2015-09-26 11:40:39 -07:00
Brad Hefta-Gaub
4e2cb00ec3 first cut at only returning type specific properties in getEntityProperties 2015-09-17 17:33:53 -07:00
Brad Hefta-Gaub
e1cb041576 first cut at adding desiredProperties to getProperties 2015-09-16 15:00:42 -07:00
ZappoMan
942958c4f1 only setJointState() if animation frame actually changed 2015-08-09 16:07:56 -07:00
ZappoMan
cec0f8ed1d optimize ModelEntityItem::getAnimationFrame() 2015-08-07 13:43:57 -07:00
Atlante45
256c786e28 Merge branch 'master' of https://github.com/highfidelity/hifi into smart_pointers 2015-07-17 17:59:19 -07:00
Andrew Meadows
18d0cb5158 cleanup of EntityItem ctors and friends 2015-07-16 17:48:28 -07:00
Atlante45
6c591131ba Made Animations safe for resource reload 2015-07-10 12:01:51 -07:00
Atlante45
7b5a5a339a Use make_shared/create to make shared pointers 2015-07-01 19:46:06 -07:00
ZappoMan
8b78fc4190 EnitityItem smart pointers 2015-05-22 17:57:50 -07:00
ZappoMan
67df6e3c62 make READ_ENTITY_PROPERTY_TO_PROPERTIES() type safe 2015-05-12 16:24:16 -07:00
ZappoMan
98474376de consolidate READ_ENTITY_PROPERTY() macros into single typesafe version 2015-05-12 15:59:45 -07:00
ZappoMan
83d212861d make APPEND_ENTITY_PROPERTY type safe 2015-05-12 11:41:04 -07:00
Andrew Meadows
f0618501dd fix non-physical kinematic motion
also can set objects collisionless again
2015-05-07 11:29:42 -07:00
Atlante45
837a0d3ba8 rename collision model in edit.js 2015-04-23 12:13:52 +02:00
Atlante45
9cec256142 Rename collisionModelURL members/methods 2015-04-22 21:16:09 +02:00
Atlante45
b446644549 Rename CollisionModelURL handle 2015-04-22 21:03:56 +02:00
Andrew Meadows
94c6053d52 fix formatting 2015-04-16 12:15:03 -07:00
Andrew Meadows
aec42cf2dc enforce ShapeType agreement for ModeEntityItem 2015-04-14 15:39:49 -07:00
Andrew Meadows
5b81b5b11b removing SHAPE_TYPE_CONVEX_HULL from entities lib 2015-04-14 14:56:32 -07:00
Seth Alves
d4461f1ecb put avatars and embedded-webserver and entities logging into their own QLoggingCategory 2015-04-06 16:22:54 -07:00
Seth Alves
a3a54e8d7d style 2015-03-25 15:21:36 -07:00
Seth Alves
1eeb2e89f8 remove some debug spam 2015-03-24 16:23:51 -07:00
Seth Alves
6e3be26013 attempting to figure out why physics motion object doesn't get updated when collision model url changes 2015-03-24 15:28:21 -07:00
ZappoMan
81bf7138a4 also attempt to clean up placement of PROP_ATTRIBUTION in the stream 2015-03-20 13:21:29 -07:00
ZappoMan
ad833b76c8 fix PROP index mismatch 2015-03-20 11:43:01 -07:00
Seth Alves
f9be7dda36 bump shape stuff from ModelEntityItem down to RenderableModelEntityItem 2015-03-17 18:55:13 -07:00
Seth Alves
069c358aa3 Work around a deadlock:
thread 15 locks Octree
thread 1 blocks waiting for Octree lock
thread 15 tries to pass a message to thread 1 with QMetaObject::invokeMethod, and hangs

thread 15 is blocked on qt message passing to thread 1
  ResourceCache::getResource                       libraries/networking/src/ResourceCache.cpp:57
  GeometryCache::getGeometry                       libraries/render-utils/src/GeometryCache.cpp:1774
  ModelEntityItem::isReadyToComputeShape           libraries/entities/src/ModelEntityItem.cpp:431
  PhysicsEngine::addEntityInternal                 libraries/physics/src/PhysicsEngine.cpp:67
  EntitySimulation::addEntity                      libraries/entities/src/EntitySimulation.cpp:129
  EntityTree::postAddEntity                        libraries/entities/src/EntityTree.cpp:91
        ^ locks simulation
  EntityTreeElement::readElementDataFromBuffer     libraries/entities/src/EntityTreeElement.cpp:773
  Octree::readElementData                          libraries/octree/src/Octree.cpp:301
  Octree::readElementData                          libraries/octree/src/Octree.cpp:354
  ...
  Octree::readBitstreamToTree                      libraries/octree/src/Octree.cpp:439
  OctreeRenderer::processDatagram                  libraries/octree/src/OctreeRenderer.cpp:136
        ^ lockForWrite Octree::_lock
  OctreePacketProcessor::processPacket             interface/src/octree/OctreePacketProcessor.cpp:91
  ReceivedPacketProcessor::process                 libraries/networking/src/ReceivedPacketProcessor.cpp:51

thread 1 is blocked on lockForWrite of Octree::_lock
  Octree::lockForWrite                             libraries/octree/src/Octree.h:292
  EntityTree::update                               libraries/entities/src/EntityTree.cpp:668
        ^ lockForWrite on Octree:_lock
  EntityTreeRenderer::update                       libraries/entities-renderer/src/EntityTreeRenderer.cpp:258
  Application::update                              interface/src/Application.cpp:2189
        ^ calls _physicsEngine.stepSimulation() before this
  Application::idle                                interface/src/Application.cpp:1535
  timer
2015-03-17 11:38:42 -07:00
Seth Alves
b76103edb0 clean up debugging spew 2015-03-16 16:44:29 -07:00
Seth Alves
6b49b0ed7d formatting 2015-03-14 11:58:53 -07:00
Seth Alves
b815c365eb formatting 2015-03-13 18:57:27 -07:00
Seth Alves
0cfc48ab43 don't copy hull points 2015-03-13 18:05:02 -07:00
Seth Alves
43dbd64f4a fix obj reader 2015-03-13 17:31:52 -07:00
Seth Alves
2368e6e5b7 collision with a hull sort of works. there is a new memory corruption problem 2015-03-13 15:41:57 -07:00
Seth Alves
89b58e2681 trying to get loaded callback for model hooked up to PhysicsEngine 2015-03-13 09:11:15 -07:00
Seth Alves
a945421d9d still trying to make PhysicsEngine::addEntityInternal be async 2015-03-12 16:38:55 -07:00
Seth Alves
2cf0e1ab25 break PhysicsEngine::addEntityInternal in half, making the 2nd part asynch. This is to allow a ModelEntityItem time to download its collision hull before the 2nd part runs 2015-03-12 15:58:09 -07:00
Seth Alves
bf1cb951a3 move PhysicsEntity so that ModelEntityItem can initiate a model download 2015-03-11 18:34:27 -07:00
Seth Alves
3a3e723f4e trying to figureo out where to download hull models 2015-03-11 14:26:30 -07:00
Seth Alves
1c73f50dbc started to hook up geometry downloader to ShapeInfo 2015-03-11 07:17:13 -07:00
Seth Alves
99300a5bc8 merge from master 2015-03-09 13:39:51 -07:00
Seth Alves
58bd8a5c65 collision model url 2015-03-07 20:30:29 -08:00
Andrew Meadows
373be95297 entity cubes are in meters 2015-03-06 15:32:03 -08:00
Andrew Meadows
8d4ea143ce easy conversions of: InDomainUnits --> InMeters 2015-02-25 14:48:06 -08:00
Andrew Meadows
2f749e3c51 merge upstream/master into andrew/isentropic
Conflicts:
	libraries/entities/src/TextEntityItem.h
2015-02-25 14:40:32 -08:00
Andrew Meadows
2ffb19a0ed getPosition() --> getPositionInDomainUnits()
and friends
2015-02-25 14:35:04 -08:00
Andrew Meadows
cfbf8fdca7 explicit cleanup of loaded model animations
in Application dtor
2015-02-13 16:19:10 -08:00
Andrew Meadows
ff27ab74ae expose _shapeType to script and server 2015-02-11 08:46:41 -08:00
Andrew Meadows
12543cae75 initial add of ModelEntityItem::_shapeType 2015-02-09 12:43:56 -08:00
Andrew Meadows
450713fdaa Entitis support new (pending) API for ShapeInfo 2015-02-08 15:08:50 -08:00
Andrew Meadows
9da6b623a3 move shape polymorphism to ModelEntityItem 2015-01-30 16:25:35 -08:00
ZappoMan
31f72107da remove support for old pre-entity svo files 2015-01-23 09:26:48 -08:00
ZappoMan
86a9d5719b fix one more case of animaiton stutter 2014-12-30 15:12:23 -08:00
ZappoMan
a0ec2ddfe9 clamp frame index between 0 and 100,000 2014-12-29 21:07:04 -08:00
ZappoMan
49e350fab2 Merge branch 'master' of https://github.com/highfidelity/hifi into animationFrameIndex 2014-12-29 14:01:35 -08:00
Andrew Meadows
b03e6c53e1 fixing derived classes to use new EntityItem API
remove 'forceCopy' argument in EntityItem::setProperties()
2014-12-18 11:41:20 -08:00
ZappoMan
660bf2720e convert AnimationCache to DependencyManager 2014-12-15 19:48:15 -08:00
ZappoMan
663b9c393e add debugging 2014-12-09 12:43:34 -08:00
Andrew Meadows
675a2dd989 add DIRTY_UPDATEABLE flag for changes that need it 2014-12-08 16:32:25 -08:00
Andrew Meadows
7d96ad5836 cleanup of EntitySimulation API
* remove EntityItem::_simulationState (only useful to EntitySimulation)
* move code from SimpleEntitySimuation to EntitySimulation
* EntitySimulation now maintans many QSets of entities
* cleanup and clarify use of EnityTree::updateEntity()
* reduced cost of polling for entity expiries
* changed "UpdateFlags" to "DirtyFlags" and clarified what they're for
2014-12-05 18:08:53 -08:00
Andrew Meadows
ab011d5b30 fix for non-animating models 2014-12-03 16:49:49 -08:00
ZappoMan
5c2cc20313 fixes the stutter in animation when observer moves 2014-11-28 17:36:55 -08:00
Andrew Meadows
af606f01a9 combined SimulationStates Moving and Changing
also funnel entity updates by UDP packet through a single list
2014-11-17 17:35:44 -08:00
ZappoMan
7b69642c67 fix bug in animation jitter on turn 2014-11-13 23:03:12 -08:00
ZappoMan
3e521e089b fix unix build 2014-11-13 09:48:15 -08:00
ZappoMan
8ec12ea954 add full animation settings support 2014-11-13 08:59:06 -08:00
ZappoMan
bc60c90308 only actually set the properties if they were in the buffer 2014-11-13 08:39:19 -08:00
ZappoMan
8a2e3d5045 add animationSettings property to model entities 2014-11-12 17:41:55 -08:00
ZappoMan
ef17659ea2 cleanup 2014-11-12 16:57:42 -08:00
ZappoMan
dd22683672 fixing up animation loop issues 2014-11-12 16:53:16 -08:00
ZappoMan
245f019836 first cut at migrating entity animation frame calculations to use AnimationLoop 2014-11-12 16:10:35 -08:00
ZappoMan
95c5b417c9 texture support in model entities 2014-10-30 11:04:19 -07:00
ZappoMan
44230a315b add naturalDimensions and moved sitting points to exclusively be in properties 2014-09-09 17:45:50 -07:00
ZappoMan
b78b8ccbb0 first cut at replacing radius with dimensions 2014-09-09 13:33:05 -07:00
ZappoMan
dc31381fc1 better handling of old model files 2014-09-05 02:19:17 -07:00
ZappoMan
e8b1497d60 revert to old _lastUpdated behavior to fix animations and movement 2014-09-02 19:28:33 -07:00
ZappoMan
10d581925c DRY up the property reading code by using macro for repeated pattern 2014-09-02 10:31:26 -07:00
ZappoMan
799931aa6c DRY up the property setting code by using macro for repeated pattern 2014-09-02 09:30:28 -07:00
ZappoMan
2b5d631290 removed a ton of old dead debug code 2014-09-02 08:44:43 -07:00
ZappoMan
f16a48e187 quiet some debugging 2014-09-01 22:38:18 -07:00
ZappoMan
b244e78af4 working on addressing issues with sibling cells and server clock skew causing some properties to be ignored 2014-09-01 21:48:03 -07:00
ZappoMan
ed670ff48e fix bug with animations randomly not working 2014-08-29 20:19:24 -07:00
ZappoMan
76c77d6994 first cut at properly working lifetime 2014-08-28 13:46:54 -07:00
ZappoMan
2f90df04ee correct cleanup of Models/geometry and all EntityItems for various cases 2014-08-27 15:45:45 -07:00
ZappoMan
5c2b674a0d verify delete behavior actually frees memory associated with EntityItems 2014-08-27 12:07:11 -07:00
ZappoMan
30e00bbd69 final pass on entities import/export/overlays working as well as production 2014-08-27 11:34:50 -07:00
ZappoMan
4895ee32f7 test and fix issues with exportEntities() 2014-08-26 15:59:49 -07:00
ZappoMan
8d947662c8 fix conversion from old format to new format of entity IDs 2014-08-26 13:21:49 -07:00
ZappoMan
17426a1c71 removed tons of debugging 2014-08-20 17:47:16 -07:00
ZappoMan
ef86d86234 split out entity rendering into subclasses, improved rendering of models 2014-08-20 15:49:50 -07:00
ZappoMan
daffb00bf2 build issues fixed after merge 2014-08-18 15:41:20 -07:00
ZappoMan
84ba810dc4 work on reseved bytes in octree packet data 2014-08-15 11:26:55 -07:00
ZappoMan
fbe409a0c2 added lots of debugging for octree edit packet sender bug fixed threading issue 2014-08-14 11:23:56 -07:00
ZappoMan
49e616dd49 first cut at using erase entity message to delete entities 2014-08-13 14:11:56 -07:00
ZappoMan
3551bd676f quiet a lot of debugging, fix issue with updating entities that overhang the domain bounds 2014-08-12 13:14:28 -07:00
ZappoMan
466b4c5e40 add some basic support for coming to a rest on the ground plane in case of downward gravity 2014-08-11 14:52:19 -07:00
ZappoMan
7c8163c475 first cut at getting velocity to work in entity base class 2014-08-11 10:36:03 -07:00
ZappoMan
a96aa5f937 clean up subclass properties, properly handle new baseclass props like damping 2014-08-10 14:20:37 -07:00
ZappoMan
55e12baf78 more base class properties work 2014-08-08 18:06:16 -07:00
ZappoMan
2892c37210 implement readEntitySubclassDataFromBuffer() for EntityItem 2014-08-08 17:55:56 -07:00
ZappoMan
90c7989765 implement appendSubclassData() for EntityItem 2014-08-08 17:38:26 -07:00
ZappoMan
6f479a1026 convert IDs to UUIDs 2014-08-07 17:02:11 -07:00
ZappoMan
cd4ea4b34f more animation work 2014-08-07 13:13:37 -07:00
ZappoMan
f1d2017a9e getting animation working again 2014-08-07 12:50:02 -07:00
ZappoMan
b7b89dcbec move glow effect to property of all entities, add tools for editing boxes 2014-08-06 12:29:09 -07:00
ZappoMan
e540bef672 more hacking on rendering of virtual entities 2014-08-06 09:12:14 -07:00
ZappoMan
e9db4fd120 registration of multiple entity types: Model and Box 2014-08-05 12:10:17 -07:00
ZappoMan
273853ef24 more work on virtual entities 2014-08-04 16:18:24 -07:00