Commit graph

735 commits

Author SHA1 Message Date
Seth Alves
a1096510e8 put some useless consts back 2015-10-28 10:52:01 -07:00
Seth Alves
f6a0004f26 get rid of some useless consts 2015-10-28 10:45:24 -07:00
Seth Alves
08a0bf33a4 avoid unneeded read-lock if action-data was dirty 2015-10-28 09:55:55 -07:00
Seth Alves
d504f449e4 undo last commit -- avoid unneeded read-lock if action-data was dirty 2015-10-28 09:55:11 -07:00
Seth Alves
2b5b4f1118 avoid unneeded read-lock if action-data was dirty 2015-10-28 09:54:16 -07:00
Seth Alves
f91dc93620 adjust locking in EntityItem::getActionDataInternal 2015-10-28 08:40:38 -07:00
Seth Alves
f3c61a823e try harder to get children flags right when something moves. added worldToLocal methods 2015-10-23 16:58:09 -07: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
Seth Alves
22af5b27ab avoid shared_from_this while constructing 2015-10-23 12:55:48 -07:00
Seth Alves
bf290c35be when an entity gets a physics flag set, set the same flag in any children 2015-10-23 09:46:57 -07:00
Seth Alves
7b08d047b1 when EntityTree::updateEntityWithElement is called on an entity, call it on all the children of that entity 2015-10-22 16:59:56 -07:00
Seth Alves
d86d69aeba keep track of children. use local position and orientation on the wire. 2015-10-22 15:36:03 -07:00
Seth Alves
778dc8dc15 add parentID and parentJointIndex EntityItemProperties 2015-10-22 11:52:56 -07:00
Seth Alves
264b658132 hook up entities and avatars to SpatialParentFinder 2015-10-22 11:05:48 -07:00
Seth Alves
6cb195b335 Merge branch 'master' of github.com:highfidelity/hifi into parents 2015-10-20 15:53:56 -07:00
Seth Alves
bddbe89c86 don't accept incoming location edits if an entity is being controlled by a shouldSuppressLocationEdits action 2015-10-19 16:13:53 -07:00
Seth Alves
9e24542c0b don't accept incoming location edits if an entity is being controlled by a shouldSuppressLocationEdits action 2015-10-19 16:05:56 -07:00
Seth Alves
00594f0cce don't accept incoming location edits if an entity is being controlled by a shouldSuppressLocationEdits action 2015-10-19 16:05:10 -07:00
Seth Alves
46e5bf0435 take entity-server clock-skew into account when handling action expiration times 2015-10-19 11:59:03 -07:00
Seth Alves
37923e81bb make SpatiallyNestable::_transform private 2015-10-18 08:18:10 -07:00
Seth Alves
275e77d29e remove old-style avatar referentials 2015-10-18 07:51:00 -07:00
Seth Alves
b18bb1e076 Merge pull request #6084 from AndrewMeadows/physics-cleanup
move DIRTY_FLAGS out of EntityItem namespace
2015-10-16 07:22:40 -07:00
Andrew Meadows
fa17b77d70 move DIRTY_FLAGS out of EntityItem namespace 2015-10-15 09:34:09 -07:00
Seth Alves
9937b6a3ef quiet some debugging 2015-10-14 13:12:11 -07:00
Seth Alves
07a4dc3a7f more lock fixing 2015-10-14 12:49:06 -07:00
Seth Alves
fa2bf2b2d9 tighten up locking in actions 2015-10-14 11:43:03 -07:00
Seth Alves
742cc0f511 rename a function 2015-10-14 06:17:55 -07:00
Seth Alves
644076214e fix hang 2015-10-13 16:55:04 -07:00
Seth Alves
4402242c3c allow an action to suppress sending of physics related edits to the entity-server 2015-10-13 16:27:40 -07:00
Seth Alves
2ecb7e8d29 fix bug that was making action deletes fail 2015-10-13 16:19:12 -07:00
Seth Alves
54eac099b9 tweak 2015-10-13 12:52:53 -07:00
Seth Alves
83780296de don't send physical property updates if there's an action on the object 2015-10-13 12:12:57 -07:00
Brad Hefta-Gaub
57cc7adbfe standardize somethingChanged - CR feedback 2015-10-07 12:27:12 -07:00
Seth Alves
993111d22f code review 2015-10-05 11:28:59 -07:00
Seth Alves
67cc944afc fix double free problem 2015-10-02 13:27:45 -07:00
Seth Alves
9f27e5ff1f back out a couple other unneeded changes 2015-10-01 18:21:53 -07:00
Seth Alves
40c5103d2f back out change where actino data caches were split into in/out 2015-10-01 17:15:20 -07:00
Seth Alves
e90b156b7b avoid: add an action, immediately receive an update to that entities action, delete the just-added action because it wasn't in the packet 2015-10-01 17:02:02 -07:00
Seth Alves
f2ebba9863 separate out the inbound and outbound caches of serialized action data 2015-10-01 16:16:23 -07:00
Seth Alves
fa7a5f1a61 formatting, fix a bug 2015-10-01 14:51:33 -07:00
Seth Alves
56b50b5fb3 also add action to _previouslyDeletedActions if the local interface deletes the action 2015-10-01 14:45:10 -07:00
Seth Alves
d320f5b6f4 remember uuid of deleted actions for 20 seconds and don't re-add them 2015-10-01 14:40:12 -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
Brad Davis
9b81842850 Merge branch 'master' into homer
Conflicts:
	assignment-client/src/octree/OctreeSendThread.cpp
	interface/src/Application.cpp
	libraries/entities-renderer/src/EntityTreeRenderer.cpp
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityTree.cpp
	libraries/entities/src/EntityTreeElement.cpp
	libraries/entities/src/EntityTreeElement.h
	libraries/entities/src/EntityTreeHeadlessViewer.cpp
	libraries/entities/src/RecurseOctreeToMapOperator.cpp
	libraries/octree/src/Octree.h
	libraries/physics/src/EntityMotionState.cpp
2015-09-11 16:31:18 -07:00
Seth Alves
b1c5a04531 respond to code review 2015-09-11 09:29:52 -07:00
Brad Davis
b7ffb96adf Working on thread safety for the entity tree 2015-09-10 22:28:50 -07:00
Brad Davis
3bc9e8c98d Fixing some entity race condition crashes 2015-09-10 20:43:41 -07:00
Seth Alves
31fcd55d47 octree uses shared pointers 2015-09-08 11:59:48 -07:00
ericrius1
5fa27a7cf1 added back computeAndUpdate mmethod for particles, and now handling parsing old streams 2015-08-24 10:59:38 -07:00
ZappoMan
0990229c64 cache calculation of aabox and aacubes 2015-08-11 18:05:22 -07:00
Stephen Birarda
f8c832e50b resolve conflicts on merge with upstream master 2015-07-17 16:48:46 -07:00
Andrew Meadows
32b1fe0918 proper fix for incorrect render of scaled entities 2015-07-17 15:21:02 -07:00
Stephen Birarda
e5722098f6 resolve conflicts on merge with upstream/master 2015-07-17 11:06:01 -07:00
Andrew Meadows
2441be21e2 restore order of setting properties 2015-07-16 20:58:34 -07:00
Andrew Meadows
18d0cb5158 cleanup of EntityItem ctors and friends 2015-07-16 17:48:28 -07:00
Stephen Birarda
821c16cbc4 resolve conflicts on merge with uptream/master 2015-07-14 09:52:20 -07:00
Andrew Meadows
7610fe48c2 filter action updates during simulation ownership
This fixes a bug where actions can be thrashed (created/deleted)
by late entity update echos from the entity-server.
2015-07-14 09:24:37 -07:00
Clément Brisset
24eb4c8263 Merge pull request #5309 from sethalves/quiet-compiler
quiet compiler
2015-07-13 15:55:35 -07:00
Seth Alves
5aca0c28ef quiet compiler 2015-07-13 07:37:59 -07:00
Andrew Meadows
9ce9c541de fix activation of object when action changes 2015-07-10 18:45:40 -07:00
Seth Alves
bf6fce4e45 remove unneeded const 2015-07-09 17:05:15 -07:00
Seth Alves
2dc4922da3 bring over code from entity-level-locking branch 2015-07-09 15:23:05 -07:00
Seth Alves
a01fb6f1dc if an action changes its own arguments, cause reserialisation 2015-07-09 14:32:34 -07:00
Stephen Birarda
19c5f0b67c resolve conflicts on merge with upstream/master 2015-07-08 22:54:36 -07:00
Atlante45
e2718d5c94 Merge branch 'protocol' of https://github.com/birarda/hifi into protocol 2015-07-08 18:26:36 -07:00
Brad Davis
98e0688e98 Reducing heap allocation in network packet parsing 2015-07-08 17:21:38 -07:00
Stephen Birarda
fa71c781f4 cleanup edit message memory management in octree packet sending 2015-07-08 14:12:04 -07:00
ZappoMan
2aa345dfc6 Merge branch 'master' of https://github.com/highfidelity/hifi into inBoundStats 2015-07-03 15:04:59 -07:00
ZappoMan
29a7584ee6 remove dead code 2015-07-03 11:29:59 -07:00
ZappoMan
0c0b8dbbc1 add stats for elements and entities per incoming packet 2015-07-02 16:19:13 -07:00
ZappoMan
b568e895ec Merge branch 'master' of https://github.com/highfidelity/hifi into inBoundStats 2015-07-02 15:00:09 -07:00
ZappoMan
5c4d4893de added bytes per edit stats 2015-07-02 13:44:28 -07:00
ZappoMan
b13a4b2a71 add edit update stats 2015-07-02 11:07:47 -07:00
Seth Alves
b19d505fc1 remove stray debug print 2015-07-01 20:32:45 -07:00
Seth Alves
246861221c rearrange things so that when EntityItem::setActionData is called before the entity-tree is set up, the data is set aside and used once the entity-tree is ready. 2015-07-01 20:17:21 -07:00
Seth Alves
6e3cab9f4d fix logic problem with previous fix 2015-07-01 12:37:15 -07:00
Seth Alves
593ed9f998 work around problem where EntityItem::setActionData is called before the entity tree is set up 2015-07-01 12:26:51 -07:00
Seth Alves
e8a6acd65b responses to code review 2015-07-01 10:42:04 -07:00
Seth Alves
5e2f7204b4 responses to code review 2015-07-01 10:29:42 -07:00
Seth Alves
a300dec1f7 update entity data bytes whenever it's asked for 2015-06-30 10:42:34 -07:00
Seth Alves
9b7ea19087 include action type in arguments delivered to scrips 2015-06-29 14:33:58 -07:00
Seth Alves
1d122060a6 merge andrew's sim-ownership branch 2015-06-29 09:50:38 -07:00
Andrew Meadows
769755e30a recycle PROP_SIMULATOR_ID 2015-06-29 06:20:14 -07:00
Seth Alves
0970f010a4 provide a way for scripts to get information about what actions an entity has and what the arguments of those actions are 2015-06-27 13:31:00 -07:00
Seth Alves
c0c1116c69 attempt some clean-ups in edge/unexpected situations 2015-06-27 11:09:28 -07:00
Seth Alves
30be515a94 remove unneeded lock around action-data in entity item. Actions now use a weak pointer to keep track of owner entity 2015-06-27 08:53:27 -07:00
Andrew Meadows
4d4b97fe59 add priority promotion to reduce volunteer races
also fix priority inheritance from chained collisions
2015-06-26 22:30:06 -07:00
Andrew Meadows
e18506c77f promote volunteer priority
also remove some cruft
change uint8_t to be quint8
2015-06-26 22:00:43 -07:00
Andrew Meadows
d6c69e8fe6 pack terse update parameters near each other
also don't constantly resend ownership data
2015-06-26 22:00:43 -07:00
Andrew Meadows
ff67b54f87 don't read terse update data for objs we own 2015-06-26 21:58:40 -07:00
Andrew Meadows
44d3074561 remove debug code 2015-06-26 21:58:03 -07:00
Andrew Meadows
12fc18092b SimulationOwner as one property 2015-06-26 21:58:03 -07:00
Andrew Meadows
cf74dbe1dc partial progress toward sim ownership negotiations
works well for just a few objects but fails for piles
committing some debug stuff that will have to be torn out later
2015-06-26 21:57:04 -07:00
Andrew Meadows
7c793c6397 accept simulation release from entity-server 2015-06-26 21:57:04 -07:00
Andrew Meadows
d0ac3e4514 more work on simulator priority
scripts that edit terse update data try to assert priority
physics simulation tries to assert "volunteer" priority
max priority rules are applied in entity server
2015-06-26 21:57:04 -07:00
Andrew Meadows
82ba5cd4b6 sim ownership uses expiry, apply priority rules 2015-06-26 21:57:04 -07:00
Andrew Meadows
443c7d9c70 allow equal priority to take simulation ownership 2015-06-26 21:57:04 -07:00
Andrew Meadows
8afd9a5e1d add EntityItem::_simulatorPriority as uint8_t 2015-06-26 21:57:04 -07:00
Seth Alves
9f6ec4120d undo previous experiment 2015-06-26 18:43:56 -07:00
Seth Alves
0739c46249 if new action data is the same as the old action data, don't re-unpack it 2015-06-26 18:13:53 -07:00
Seth Alves
b4537b081f fix clearActions 2015-06-26 16:02:47 -07:00
Seth Alves
bc7271769c merge from master 2015-06-26 14:29:40 -07:00
David Rowe
1898c6bd55 Merge branch 'master' into 20547
Conflicts:
	libraries/networking/src/PacketHeaders.cpp
	libraries/networking/src/PacketHeaders.h
2015-06-26 13:05:51 -07:00
Seth Alves
d09588b7fa put upper bound on size of serilized action parameters so they'll fit in MTU 2015-06-26 12:11:34 -07:00
Seth Alves
0af137af36 save encoded action data rather than generating it on demand 2015-06-23 15:27:25 -07:00
Seth Alves
7f4e3f8216 when deserializing action, remove any existing actions that weren't part of the serialized data 2015-06-22 13:12:34 -07:00
Seth Alves
5381e6e9bb entity server has its own version of actions which simply remember the encoded arguments. Entities with actions don't experience simulateKinematicMotion 2015-06-19 16:20:07 -07:00
Seth Alves
fca06d9d3d add actionData to properties that EntityItem transmits and receives 2015-06-19 09:36:06 -07:00
Seth Alves
fce551099f first stab at sending action data across wire 2015-06-18 18:32:57 -07:00
Seth Alves
32cf669d8b moving toward sending actions over wire 2015-06-18 17:51:41 -07:00
Seth Alves
b258aeaa3d merge from master 2015-06-18 10:04:14 -07:00
David Rowe
6623d0c552 Add "Reload" button associated with entity editor's script URL field
The Reload button re-downloads the script for both the editor and for
everyone in the vicinity.
2015-06-17 16:11:32 -07:00
Seth Alves
508ae276c6 enable -Wdouble-promotion 2015-06-16 18:23:10 -07:00
Seth Alves
4a00bd3e7f quiet compiler 2015-06-15 16:06:20 -07:00
Niraj Venkat
182a3e918c Hyperlink properties now propagate locally and over network 2015-06-10 13:12:18 -07:00
ZappoMan
5d6112d9c5 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-06-08 12:29:32 -07:00
ZappoMan
7dc0e8a66c Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-06-05 12:21:29 -07:00
Seth Alves
b425cc6491 merge from upstream 2015-06-05 11:56:33 -07:00
Seth Alves
b0480af040 Merge pull request #5053 from AndrewMeadows/isothermal
fix crash during bogus reconnect on login
2015-06-05 11:38:23 -07:00
Seth Alves
aff582287d use const references for arguments in action-related calls 2015-06-05 11:26:54 -07:00
ZappoMan
f8a2fff5a7 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-06-05 11:06:10 -07:00
Seth Alves
28c034698f Merge branch 'master' of github.com:highfidelity/hifi into actions 2015-06-05 10:41:20 -07:00
Seth Alves
eb912892dc code review 2015-06-05 09:56:34 -07:00
Seth Alves
ba42b0dcc4 updateAction and deleteAction 2015-06-04 17:51:59 -07:00
Seth Alves
5e5bc497d9 remove debugging prints 2015-06-04 12:44:08 -07:00
Seth Alves
66ab3d455f use shared pointers to keep track of action objects 2015-06-04 12:29:05 -07:00
Andrew Meadows
0514736a3e remove last of *InDomainUnits code 2015-06-04 11:24:10 -07:00
Seth Alves
14026667f5 script interface for creating an action now takes an action-type name rather than having a different call for each action 2015-06-04 10:55:32 -07:00
Seth Alves
57d85cece0 get rid of simulation back-pointer in actions 2015-06-04 09:41:32 -07:00
Seth Alves
d634663bb1 simple action is working. destructor sequense is still suspicous 2015-06-03 17:33:55 -07:00
Seth Alves
9861e8afcc adjust assert 2015-06-03 11:47:42 -07:00
ZappoMan
7c40b666e8 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching-scene-api 2015-06-03 09:52:40 -07:00
Seth Alves
a31a5a1554 main actions interface is in EntityItem. changes in actions are queued up and applied before simulation step 2015-06-02 19:40:20 -07:00
Seth Alves
f84e970c48 Merge branch 'master' of github.com:highfidelity/hifi into actions 2015-06-02 16:28:07 -07:00
Seth Alves
d6549948d0 first pass at entity interface to actions 2015-06-02 16:06:27 -07:00
Andrew Meadows
0e2028b820 merge
Conflicts:
	libraries/entities/src/EntityItem.cpp
2015-06-02 15:08:36 -07:00
Atlante45
ad3cea9907 Disable entity debub 2015-06-02 18:23:37 +02:00
Andrew Meadows
cc9ae81c75 group Entity property settings together 2015-06-01 14:47:14 -07:00
ZappoMan
d4af454834 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-06-01 14:42:35 -07:00
Seth Alves
fe59f8846f recompute polyvox mesh when setVoxelSurfaceStyle is called. remove left-over color stuff from polyvox. don't require that a polyvox be rendered before computing its physics shape 2015-05-30 16:43:11 -07:00
Andrew Meadows
8177512432 send all TerseUpdate properties when one changes 2015-05-29 11:35:50 -07:00
ZappoMan
94f6e8cebd Merge branch 'team-teaching' of https://github.com/highfidelity/hifi into team-teaching-scene-api 2015-05-29 11:23:22 -07:00
ZappoMan
dc62052a3c more hacking on models 2015-05-29 11:07:25 -07:00
Atlante45
ab13bc41a4 Merge branch 'team-teaching' of https://github.com/highfidelity/hifi into team-teaching 2015-05-29 17:53:17 +02:00
ZappoMan
78c701a89d Merge branch 'team-teaching' of https://github.com/highfidelity/hifi into team-teaching-scene-api 2015-05-29 08:40:46 -07:00
Atlante45
0384b74479 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-05-29 17:37:53 +02:00
Atlante45
f07f9ac0c5 Expand setDimensions check to negative values 2015-05-29 17:04:39 +02:00
ZappoMan
eb19b93433 render models in scene checkpoint 2015-05-28 17:19:30 -07:00
Seth Alves
6b8b930839 Merge branch 'master' of github.com:highfidelity/hifi into created-time-is-a-property 2015-05-28 16:16:13 -07:00
Andrew Meadows
7be16da1a8 compute correct time-of-flight for extrapolation 2015-05-28 14:24:39 -07:00
ZappoMan
a0e51469d3 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-05-28 12:36:34 -07:00
Andrew Meadows
b7e3461e1a restore _created magic 2015-05-28 12:21:38 -07:00
Seth Alves
92817d9302 created-time is a property so it can be persisted to and retrieved from json saves 2015-05-28 10:59:27 -07:00
Atlante45
bca80addef Merge branch 'team-teaching' of https://github.com/highfidelity/hifi into text-renderer 2015-05-28 16:13:24 +02:00
ZappoMan
63c19f7c11 fix build buster from bad merge 2015-05-27 20:19:59 -07:00
ZappoMan
763e6dd97b Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching 2015-05-27 19:58:11 -07:00
Seth Alves
4961c10e17 Merge branch 'master' of github.com:highfidelity/hifi into polyvox 2015-05-27 19:05:01 -07:00
Andrew Meadows
aba539928d fix grab glitches and failure to own simulation 2015-05-27 18:05:59 -07:00
Seth Alves
ded79609de back out unrelated change 2015-05-27 15:10:27 -07:00
Seth Alves
3af916e27e use enum for polyvox surface style 2015-05-27 09:32:10 -07:00
Seth Alves
6930008f74 remove debugging spew 2015-05-26 21:40:50 -07:00
Seth Alves
5acc018bda debugging 2015-05-26 20:58:23 -07:00
Seth Alves
ebae87136f debugging 2015-05-26 20:57:58 -07:00
Seth Alves
1ec384ab4d allow QByteArray data to be sent with a length. Use appendRawData in places that used to append raw byte-arrays 2015-05-26 13:43:22 -07:00
Seth Alves
727f457f91 hook up RenderablePolyVoxEntityItem::findDetailedRayIntersection to polyvox library's version 2015-05-25 21:01:20 -07:00
Atlante45
3d7a834356 Ignore new entity dimensions if one of them is 0 2015-05-24 20:20:20 +02:00
Seth Alves
6c67d14fbc experimenting with physics 2015-05-22 16:21:09 -07:00
Seth Alves
e702518041 adjust logic around timestamps used by entity-server to know if something was sent. adjust which physics variables are adjusted by a non-sim-owner packet 2015-05-22 16:11:29 -07:00
ZappoMan
c7fb8fab85 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching-scene-api 2015-05-21 10:36:22 -07:00
Seth Alves
124ff68cee make EntityItemID a subclass of QUuid 2015-05-20 14:22:08 -07:00
Seth Alves
a769cfdaf2 client decides on new entity-ids, keep EntityItemID class 2015-05-20 10:42:19 -07:00
Seth Alves
f9d46b0cb5 interface decides on entityIDs rather than bouncing a temporary id through the entity server 2015-05-19 14:25:23 -07:00
Atlante45
21d9ae7cf3 Transform compute + Magic numbers 2015-05-15 21:34:54 +02:00
Atlante45
c13ad83cc4 Rename getCenter by get CenterPosition 2015-05-15 18:34:28 +02:00
Atlante45
92d4b08c38 Init _transform with correct values 2015-05-15 17:52:06 +02:00
Atlante45
d0cd18d6c0 Replace entities pos/rot/dim with transform
Removed _position, _rotation, _dimensions
Added Transform _transform
2015-05-15 17:35:24 +02:00
Andrew Meadows
53e241fb07 merge upstream/master into andrew/thermonuclear 2015-05-14 12:37:41 -07:00
Andrew Meadows
d28c400cea add restitution and friction Entity properties 2015-05-14 12:36:59 -07:00
Andrew Meadows
81d06e0dc3 Merge upstream/master into andrew/nova
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItemProperties.cpp
2015-05-14 10:09:55 -07:00
ZappoMan
0dcb89fce7 Merge branch 'master' of https://github.com/highfidelity/hifi into typeSafePropertyCleanup
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItemProperties.cpp
2015-05-13 20:33:10 -07:00
Howard Stearns
dc2e923583 Ordering for packets. 2015-05-13 15:51:11 -07:00
Howard Stearns
1a87ca04da Entity sound. 2015-05-13 13:18:02 -07:00
Andrew Meadows
4872a565c9 bid for simulation ownership 2015-05-12 21:46:52 -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
289dcb0e7f only set ACTIVATE flag on non-zero velocity 2015-05-08 15:39:45 -07:00
Andrew Meadows
1879a67804 cleanup 2015-05-07 14:42:09 -07:00
Seth Alves
f52747d8c1 re-enable code that ignores old packets 2015-05-07 11:53:57 -07:00
Andrew Meadows
6e6fec158d split ignore/activation thresholds for updates 2015-05-06 11:47:33 -07:00
Seth Alves
c35edd8eb4 some debugging on Andrew's refactor 2015-05-05 16:40:10 -07:00
Seth Alves
1cd93b9ec8 pull andrew's branch, add back in visual indicator of an entity being active in bullet 2015-05-05 13:14:22 -07:00
Andrew Meadows
25ff9e4b59 fix warning about order of ctor initialization 2015-05-05 10:27:48 -07:00
Andrew Meadows
aa5a59c3dc merge upstream/master into andrew/nova
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/physics/src/PhysicsEngine.cpp
2015-05-05 10:24:17 -07:00
Andrew Meadows
d5f4c5a0ef add/delete/cleanup of physical entities works 2015-05-05 10:10:08 -07:00
Ryan Huffman
b49a04c638 Add name property to entities 2015-05-01 08:40:24 -07:00
Andrew Meadows
9f8b266a03 fix some compile problems 2015-04-30 13:56:37 -07:00
Andrew Meadows
195dd1420c DIRTY_PHYSICS_ACTIVATION not DIRTY_PHYSICS_NO_WAKE
also add separate flag for rotation
and separate flags for linear vs angular velocity
and some combined flag masks for convenience
2015-04-30 13:17:13 -07:00
Andrew Meadows
14b6ee608a more PhysicalEntitySimulation implementation
with changes to API's accordingly (does not compile yet)
2015-04-28 15:07:37 -07:00
Andrew Meadows
72deb2e49b merge upstream/master into andrew/thermonuclear
Conflicts:
	libraries/entities/src/EntityItem.h
	libraries/physics/src/EntityMotionState.cpp
2015-04-27 12:54:21 -07:00
Seth Alves
e007617112 hook up menu-items to control debug rendering of collision hulls and owned simulations 2015-04-27 09:56:24 -07:00
Seth Alves
26511575c2 Merge branch 'master' of github.com:highfidelity/hifi into detect-ballistic 2015-04-27 06:44:59 -07:00
Andrew Meadows
b760a03360 pass arguments by const reference 2015-04-26 15:24:00 -07:00
Atlante45
ba507cef98 Fix a few warnings 2015-04-25 11:01:02 +02:00
Seth Alves
ac46f84291 cleanups 2015-04-24 18:36:41 -07:00
Seth Alves
03706359f5 cleanups 2015-04-24 17:44:52 -07:00
Seth Alves
218393a2b3 rather than keeping track of previous pos/rot sent by server, use a new flag that indicates that the values should be updated in the physics engine, but that the object should not be woken 2015-04-24 17:37:19 -07:00
Seth Alves
6e6793cbcc remove debugging prints 2015-04-24 15:18:02 -07:00
Andrew Meadows
3ecf959b3e removed cached copies of damping and restitution 2015-04-24 14:50:37 -07:00
Seth Alves
fea8d84618 sync 2015-04-24 14:09:10 -07:00
Seth Alves
a27f8f3f10 sync 2015-04-24 11:28:44 -07:00
Seth Alves
b40e78311b disable hack to notice that the server is sending the same thing repeatedly 2015-04-24 11:00:06 -07:00
Seth Alves
cf0499e671 various physics-related experiments 2015-04-23 21:07:04 -07:00
Seth Alves
bc65616bb3 Merge branch 'master' of github.com:highfidelity/hifi into detect-ballistic 2015-04-23 13:09:22 -07:00
Atlante45
0b1d4fb1d6 Merge branch 'master' of https://github.com/highfidelity/hifi into zones 2015-04-23 21:16:11 +02:00
Atlante45
b776ea8110 Make ::contains() back into a const 2015-04-23 19:15:06 +02:00
Seth Alves
c21e06e7a7 don't pile things up at the origin during a load 2015-04-23 10:08:59 -07:00
Atlante45
83490051d9 Move shape related contains() to ShapeInfo 2015-04-23 18:55:20 +02:00
Atlante45
51d99da29f Magic number 2015-04-23 17:50:26 +02:00
Atlante45
f494f86ee5 Handle registration point in transforms 2015-04-23 17:48:29 +02:00
Atlante45
bda72025af Check mesh extend before going through triangles 2015-04-23 16:40:40 +02:00
Atlante45
01f4f34911 Centralize contains standard cases 2015-04-23 13:04:59 +02:00
Seth Alves
9e96026c52 move _accelerationNearlyGravityCount and _shouldClaimSimulationOwnership from EntityItem to EntityMotionState 2015-04-22 21:36:36 -07:00
Seth Alves
3450597d70 remove some debugging prints 2015-04-22 15:03:23 -07:00
Seth Alves
92ceff1a03 clean up EntityItem constructors 2015-04-22 14:53:23 -07:00
Atlante45
dbf40afa47 Remove deprecated "*InDomainUnit" getter/setter 2015-04-22 21:03:55 +02:00
Seth Alves
e334c456ea add a place to keep track of the number of simulation steps where acceleration was close to gravity for a given Entity 2015-04-22 10:13:13 -07:00
Seth Alves
c49e2c1804 cleanups, diff minimization 2015-04-20 16:52:29 -07:00
Seth Alves
4a5631fca6 cleanups, diff minimization 2015-04-20 16:51:28 -07:00
Seth Alves
6107682658 handle ignoring simulation data echoed back to us differently 2015-04-20 16:36:56 -07:00
Seth Alves
08d300afcd use a flag to indicate that simulation ownership should be grabbed 2015-04-20 11:49:10 -07:00
Seth Alves
dac57c44da if measured acceleration is close to zero, send zero to entity server, else send gravity 2015-04-17 15:05:47 -07:00
Seth Alves
f77038c52d when ignoring an incoming packet, still read it so the data-stream pointer doesn't get screwed up 2015-04-17 09:37:48 -07:00
Seth Alves
ea8dcfa5b5 read UUIDs as UUIDs rather than as strings. more debugging prints 2015-04-16 15:33:43 -07:00
Seth Alves
d7059d8f2d add code for uuids in wire protocol. some debugging prints 2015-04-16 14:46:38 -07:00
Seth Alves
b30b9a0a30 don't update _simulatorIDChangedTime unless the value is different than the current one. if a script changes an entity, attempt to claim ownership 2015-04-16 12:03:34 -07:00
Seth Alves
df37b853f7 setup test of lockout-period oafter simulator-owner-id change 2015-04-16 08:57:57 -07:00
Seth Alves
a30e807051 get rid of unneeded updateSimulatorID, set changed simulator id in properties so it gets included in outgoing packet 2015-04-13 16:20:30 -07:00
Seth Alves
396f6b1987 mess with debugging prints 2015-04-13 15:22:54 -07:00
Seth Alves
9c2fec36fd adjust debugging, try a different DIRTY flag 2015-04-13 12:52:31 -07:00
Seth Alves
f42a43e180 cause changes to _simulatorID to be broadcast 2015-04-13 12:39:40 -07:00
Seth Alves
b472edbebb remove debug print for something that no longer exists 2015-04-09 09:26:14 -07:00
Seth Alves
1dd01cde00 expand svo to hold acceleration and id of current simulator node 2015-04-08 15:39:34 -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
Andrew Meadows
abd78fede5 fix: change of dimensions would not update physics 2015-04-03 15:11:57 -07:00
Ryan Huffman
81cb1e98ba Rename attribution to marketplaceID 2015-03-27 13:35:58 -07:00
ZappoMan
81bf7138a4 also attempt to clean up placement of PROP_ATTRIBUTION in the stream 2015-03-20 13:21:29 -07:00
Atlante45
d3ae7cf5cf Merge branch 'master' of https://github.com/highfidelity/hifi into attribution_property 2015-03-19 16:25:26 +01:00
Atlante45
8b5ade10b8 Initial add of the Attribution property 2015-03-18 18:57:05 +01:00
Seth Alves
a58f0fe76e remove cruft, formatting 2015-03-14 11:57:08 -07:00
Seth Alves
f7f75cabf4 formatting 2015-03-13 18:49:48 -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
c947f3b62c use meters in wire-protocol for versions greater than VERSION_ENTITIES_USE_METERS_AND_RADIANS 2015-03-09 14:06:59 -07:00
Andrew Meadows
f5352333f0 entities use radians per second for angular velocity 2015-03-06 16:42:06 -08:00
Andrew Meadows
373be95297 entity cubes are in meters 2015-03-06 15:32:03 -08:00
Andrew Meadows
e4c68bf31c committing some temp debug stuff to help git diff
(will remove this stuff later)
2015-03-05 18:06:08 -08:00
Andrew Meadows
b9cbd1ea6e witch internal EntityItem data to use meters 2015-03-04 09:38:37 -08:00
Andrew Meadows
90b69b1ee0 replace some "InDomainUnits" calls with "InMeters" 2015-03-01 15:58:10 -08:00
Andrew Meadows
64c28fe925 remove EntityItem::getSize() 2015-02-26 15:36:59 -08:00
Andrew Meadows
7210c7a88b added EntityTree::findEntitiesInMeters()
progress toward conversion to meters
2015-02-26 15:16:59 -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
0456cb298f lower threshold for ignoring rotation updates
one hundred fold smaller
2015-02-24 17:16:00 -08:00
Andrew Meadows
e6a6946027 merge upstream/master into andrew/thermonuclear 2015-02-09 12:44:52 -08:00
Andrew Meadows
450713fdaa Entitis support new (pending) API for ShapeInfo 2015-02-08 15:08:50 -08:00
Stephen Birarda
c96085eb91 repairs to warnings shown in Xcode 2015-02-06 10:12:04 -08:00
ZappoMan
8fd11e70cc clamp dt for skipTimeForward to prevent near infinite loops 2015-02-04 15:16:18 -08:00
Andrew Meadows
547a416c3b merge upstream/master into andrew/bispinor 2015-02-03 18:33:10 -08:00
Andrew Meadows
90202591fc remove legacy shapes from EntityItem and friends 2015-02-03 10:05:39 -08:00
Andrew Meadows
58bb137c4d bulletRotationStep --> computeBulletRotationStep 2015-01-27 17:37:12 -08:00
Andrew Meadows
23bd3f90d9 Bullet-style rotation integration for kinematics
and for dead reckoning after wire-transfer
2015-01-27 17:27:15 -08:00
ZappoMan
23892ab1e7 fixed comments 2015-01-27 11:38:14 -08:00
ZappoMan
b1586d4f90 move debug into ifdef 2015-01-27 11:29:17 -08:00
ZappoMan
45dbff67f8 more hacking 2015-01-27 11:15:33 -08:00
ZappoMan
83d1cc911a hacking 2015-01-26 19:38:24 -08:00
ZappoMan
02c0700db3 support for skipping forward on new edit packets from server 2015-01-26 17:25:06 -08:00
ZappoMan
81185cfe56 removed some debugging 2015-01-26 12:46:22 -08:00
ZappoMan
a1ec44b8e0 add developer menu item to disable sending physics updates 2015-01-26 12:05:57 -08:00
ZappoMan
73b9c06ec0 added some debugging 2015-01-26 11:13:30 -08:00
Andrew Meadows
eb4678659a remove EntityItem::getDistanceToBottomOfEntity()
and also isRestingOnSurface()
2015-01-23 15:56:44 -08:00
ZappoMan
9cc61e90f7 Merge branch 'master' of https://github.com/highfidelity/hifi into fixGlitches
Conflicts:
	libraries/entities/src/EntityItem.cpp
2015-01-23 15:01:35 -08:00
ZappoMan
fa485d21b7 added comment 2015-01-23 13:52:28 -08:00
ZappoMan
3c38a9eb53 add last simulated to the protocal 2015-01-23 13:32:38 -08:00
Andrew Meadows
36c20c24fe fix for velocity in units of domain size 2015-01-23 13:20:12 -08:00
Andrew Meadows
f2bcdfa2b4 update _lastSimulated for kinematic motion 2015-01-23 13:10:41 -08:00
Andrew Meadows
d173afaa70 add support for non-physical kinematic movement 2015-01-23 11:01:46 -08:00
ZappoMan
838a549abe debugging stutter 2015-01-22 13:31:09 -08:00
ZappoMan
14c7dc8eb9 debugging stutter 2015-01-22 13:13:18 -08:00
Philip Rosedale
1ff90bec5d Merge pull request #4124 from AndrewMeadows/inertia
support for simple kinematic motion
2015-01-16 13:33:44 -08:00
Andrew Meadows
4392af3b3a Remove pre-Bullet server-side EntityItem motion 2015-01-16 09:26:43 -08:00
Andrew Meadows
3fed38793e merge andrew/origin/inertia to andrew/local/inertia 2015-01-15 17:55:51 -08:00
Andrew Meadows
250fd98fee support for simple kinematic motion 2015-01-15 17:51:01 -08:00
Andrew Meadows
ccc50dd94f use density instead of mass 2015-01-14 15:47:44 -08:00
Andrew Meadows
03b8badd81 EntityItem stores density rather than mass. 2015-01-14 15:00:57 -08:00
Andrew Meadows
04b4a95ccb fix for bad cleanup (3 places) 2015-01-13 14:21:41 -08:00
Andrew Meadows
dcca5d532a fix for glitchy physics updates
The main problem was: ObjectMotionState::_sentPosition and friends
were not being updated when the EntityServer update arrives.
2015-01-13 14:00:37 -08:00
Andrew Meadows
7a2ecd27fd fix typo 2015-01-12 14:32:32 -08:00
Andrew Meadows
bece05a994 entity prop defaults move to their own header 2015-01-12 11:49:31 -08:00
Andrew Meadows
e711b86519 scale DEFAULT_DIMENSIONS correctly
also remove a block of commented out cruft
2015-01-10 19:07:58 -08:00
Andrew Meadows
1184f5b668 merge upstream/master into andrew/inertia 2015-01-10 12:45:14 -08:00
Andrew Meadows
25e64d619c move statics out of EntityItem
This makes for much more readable core dumps
2015-01-10 11:46:42 -08:00
Andrew Meadows
99e1fdd46e fix for EntityServer crash
adding EntityItem::_element backpointer for easier add/remove logic
2015-01-10 07:44:26 -08:00
Andrew Meadows
4946ec18b6 remove some TODO comments 2015-01-09 09:28:01 -08:00
Andrew Meadows
b0b2eb5d38 use exact equality for filtering dimension changes 2015-01-08 11:09:32 -08:00
Andrew Meadows
af9bafae87 fix typo 2015-01-07 12:48:16 -08:00
Andrew Meadows
1745548665 fix rapid attenuation of angular velocity 2015-01-07 12:42:50 -08:00
Andrew Meadows
162854c5a5 Merge pull request #4025 from ZappoMan/voxelEctomy
Voxel ectomy
2015-01-05 13:20:30 -08:00
Andrew Meadows
6fb4e1f622 oops, need to update angularVelocity after damping 2015-01-05 12:23:55 -08:00
Andrew Meadows
bf6b8f9ca7 do not zero small velocities for non-bullet case 2015-01-05 12:01:09 -08:00
Andrew Meadows
3b7770f405 change meaning of damping to agree with bullet
0 = no damping
1 = 100% damping

The new formula is: velocity *= (1 - damping)^dt
2015-01-05 11:23:01 -08:00
Andrew Meadows
d032eab0de merge upstream/master into andrew/inertia 2015-01-05 09:19:37 -08:00
Atlante45
022beff569 Initialize entities' _locked and _script 2015-01-02 12:37:00 -08:00
Andrew Meadows
0d3e78fdb8 modify extrapolation behavior when bullet enabled
Allows Bullet to specify an object as "at rest"
by setting velocity to zero.
Also, moved velocity damping above position integration
to get the same order of operations as Bullet.
2014-12-31 16:32:09 -08:00
ZappoMan
9630279459 Merge branch 'master' of https://github.com/highfidelity/hifi into voxelEctomy
Conflicts:
	examples/editVoxels.js
	examples/fallingSand.js
	examples/growTrees.js
	interface/src/Application.cpp
	interface/src/Application.h
	libraries/avatars/CMakeLists.txt
	libraries/entities/src/EntityItem.h
2014-12-31 10:50:53 -08:00
ZappoMan
4ea9bbc309 first major pass at voxelEctomy 2014-12-30 18:08:58 -08:00
Andrew Meadows
da551a0a76 restore script change detection to what it was 2014-12-30 11:56:39 -08:00
Andrew Meadows
ba873deb49 ignore Entity updates that don't change anything 2014-12-30 11:38:24 -08:00
Andrew Meadows
97f44b64fc assert NULL EntityItem::_physicsInfo in dtor 2014-12-29 15:27:54 -08:00
Andrew Meadows
dab1f026d7 simpler EntityItem::simulate() bypass for bullet 2014-12-18 13:56:18 -08:00
Andrew Meadows
85fd1fc14f merge andrew/thermonuclear into andrew/inertia
Conflicts:
	interface/src/Application.cpp
	libraries/entities/src/EntityItem.cpp
2014-12-18 13:46:06 -08:00
Andrew Meadows
28381a3b70 cleanup of EntityItem::_created timestamp logic
EntityItem::_created initializes to 0 in ctor
and must be set either by EntityItemProperties (via server update)
or manually whenever a script creates a fresh entity
2014-12-18 11:39:02 -08:00
Andrew Meadows
756d09d895 fix typo that broke the build 2014-12-17 16:06:15 -08:00
Andrew Meadows
75d468da9e set _lastEdited to _created rather than to zero 2014-12-17 15:59:16 -08:00
Andrew Meadows
44ebf37510 handle case where obj at rest but still falls 2014-12-17 15:52:34 -08:00
Andrew Meadows
1e5c44f117 accept changes with the same Edit timestamp 2014-12-17 15:48:49 -08:00
Andrew Meadows
547c4cdaf9 make non-bullet entity simulation work again 2014-12-17 14:52:38 -08:00
Andrew Meadows
6ea766b48d merge andrew/thermonuclear into andrew/inertia
Conflicts:
	interface/src/Application.cpp
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityTypes.cpp
2014-12-17 13:21:00 -08:00
Andrew Meadows
8de309a7a9 more correct _created and _lastEdited 2014-12-17 12:38:26 -08:00
Andrew Meadows
e36ee2a961 more correct creation and edit times for entities 2014-12-17 12:19:34 -08:00
Andrew Meadows
0f488bca02 differentiation btw _lastEdited and _lastSimulated 2014-12-15 14:28:53 -08:00
Andrew Meadows
3fd2f12a73 merge upstream/master into andrew/inertia
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItem.h
	libraries/entities/src/EntitySimulation.h
	libraries/entities/src/EntityTree.cpp
	libraries/entities/src/EntityTreeElement.cpp
	libraries/entities/src/SimpleEntitySimulation.cpp
	libraries/entities/src/SimpleEntitySimulation.h
	libraries/entities/src/SphereEntityItem.cpp
2014-12-09 12:41:53 -08:00
Andrew Meadows
3ce1d4a38d set dirty bit when script changes simulation stuff
also fixes for linear and angular damping
2014-12-08 11:21:01 -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
85e7c6166b support for spherical entities 2014-12-03 12:10:26 -08:00
Andrew Meadows
1df6c32a4e moving Shape* back into shared lib
removing dependency of entities lib on physics lib
physics lib now depends on entities lib
2014-12-01 16:03:14 -08:00
Andrew Meadows
ec1f11c1a8 route more entity updates into physics engine 2014-11-24 11:21:40 -08:00
Andrew Meadows
51da678675 update entity MotionType when it changes 2014-11-19 17:05:31 -08:00
Andrew Meadows
8bd3779d7d merge andrew/thermonuclear into andrew/inertia
Conflicts:
	libraries/entities/src/EntityItem.h
2014-11-19 15:55:10 -08:00
Andrew Meadows
11e7339e9e add UPDATE_COLLISION_GROUP and UPDATE_MOTION_TYPE 2014-11-19 15:52:57 -08:00
Andrew Meadows
961dc5a231 merge andrew/thermonuclear into andrew/inertia
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItem.h
2014-11-19 15:41:53 -08:00
Andrew Meadows
97d1dc4200 use updateFoo() where entity properties need relay
clear EntityItem updateFlags when processed
2014-11-19 15:12:22 -08:00
Andrew Meadows
a183248f38 add updateFoo() methods that accumulate flags
about properties that have changed
2014-11-19 14:12:26 -08:00
Andrew Meadows
3b85805048 add EntityItem::updateFoo() methods that set flags
when properties are actually changed
2014-11-19 14:01:55 -08:00
Andrew Meadows
388830c2a2 Merge branch 'bispinor' into inertia
Conflicts:
	interface/src/entities/RenderableModelEntityItem.cpp
	libraries/entities/src/BoxEntityItem.cpp
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItem.h
	libraries/entities/src/EntityTree.cpp
	libraries/entities/src/EntityTree.h
	libraries/entities/src/EntityTreeElement.cpp
2014-11-18 10:23:38 -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
Andrew Meadows
dd0bdabfe1 setSimulationState() --> computeSimulationState() 2014-11-17 15:50:35 -08:00
Andrew Meadows
5eb606c44a merge upstream/master into andrew/inertia 2014-11-14 09:04:27 -08:00
Atlante45
9fc7451581 Move macros to the end 2014-11-13 17:06:57 -08:00
Atlante45
40576b3c03 moved append to the end 2014-11-13 17:02:45 -08:00
Atlante45
f8be98260c String specific macros 2014-11-13 16:32:15 -08:00