• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data vector modeling query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data vector modeling query


  • Subject: Re: Core Data vector modeling query
  • From: Erik Buck <email@hidden>
  • Date: Mon, 1 Dec 2008 06:59:31 -0800 (PST)

I use Core Data to store large amounts of 3D vector data.  I solved your problem in the following way:
 
I have a "Vector3D" entity that you can think of as an "end point" in your model.  My Vector3D entity has x,y,z attributes.
 
I have a "Vector3DReference" entity.
 
Vector3D has a "to many" relationship to Vector3DReference which has a "to one" relationship to Vector3D.  I can ask any Vector3D for all of its references, and I can as a reference for its Vector3D.
 
Vector3DReference is abstract.  I have derived Vector3DReference for all of the cases where I have other entities with relationships to Vector3DReference.  For example, I have a Billboard entity that has a "to one" relationship to BillboardAnchorVector3DReference which has a reciprocal "to one" relationship back to Billboard.
 
It is common in 3D systems to have a large collection or database of points/vectors and then reference the points/vectors for index or ID.  E.g. consider multiple triangles that all share a vertex. When the vertex changes, all of the triangles that share the vertex are updated.  Sharing vertex data also reduces the storage required vs. lots of copies of the vertex.
 
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Core Data vector modeling query
      • From: Paul Tomlin <email@hidden>
    • Re: Core Data vector modeling query
      • From: Thomas Davie <email@hidden>
  • Prev by Date: best way to add transitions
  • Next by Date: Re: Core Data vector modeling query
  • Previous by thread: Core Data vector modeling query
  • Next by thread: Re: Core Data vector modeling query
  • Index(es):
    • Date
    • Thread