|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
Is it possible to access an object attributes (position).
e.g.
I have declared an object that is an intersection of several objects and
translated it to a location. This object is held in an array.
Can I then access the x, y, z location of that object somehow?
Thanks
Seanb
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 May 2013 19:19:54 +0200, s.day <s.d### [at] uelacuk> wrote:
> Hi,
>
> Is it possible to access an object attributes (position).
>
> e.g.
>
> I have declared an object that is an intersection of several objects and
> translated it to a location. This object is held in an array.
>
> Can I then access the x, y, z location of that object somehow?
>
> Thanks
>
> Seanb
>
ObjectCenter = min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
--
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Nekar Xenos" <nek### [at] gmailcom> wrote:
> On Wed, 15 May 2013 19:19:54 +0200, s.day <s.d### [at] uelacuk> wrote:
>
> > Hi,
> >
> > Is it possible to access an object attributes (position).
> >
> > e.g.
> >
> > I have declared an object that is an intersection of several objects and
> > translated it to a location. This object is held in an array.
> >
> > Can I then access the x, y, z location of that object somehow?
> >
> > Thanks
> >
> > Seanb
> >
>
> ObjectCenter = min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
>
>
> --
> -Nekar Xenos-
Thanks, just what I needed.
Sean
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 May 2013 20:54:17 +0200, s.day <s.d### [at] uelacuk> wrote:
> Thanks, just what I needed.
>
>
You're welcome :)
--
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nekar Xenos wrote:
> ObjectCenter = min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
Or 0.5*(min + max) if you're a fan of distributive law ;)
Also note that min/max_extend is actually the bounding
box and may not yield the expected position for all objects.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 May 2013 23:46:07 +0200, Christian Froeschlin <chr### [at] chrfrde>
wrote:
> Nekar Xenos wrote:
>
>> ObjectCenter =
>> min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
>
> Or 0.5*(min + max) if you're a fan of distributive law ;)
>
> Also note that min/max_extend is actually the bounding
> box and may not yield the expected position for all objects.
>
It seems it's too long since I've done proper algebra. Your solution makes
perfect sense, yet can't seem to get from my solution to yours
algebraically.
--
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>>> min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
>>
>> Or 0.5*(min + max) if you're a fan of distributive law ;)
>
> It seems it's too long since I've done proper algebra. Your solution
> makes perfect sense, yet can't seem to get from my solution to yours
> algebraically.
an algebraic mystification that is easily resolved ;)
1.0 * min + 0.5 * (max - min)
= 1.0 * min + 0.5 * max - 0.5 * min
= 0.5 * min + 0.5 * max
= 0.5 * (min + max)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 16/05/2013 9:55 PM, Christian Froeschlin wrote:
> an algebraic mystification that is easily resolved ;)
>
> 1.0 * min + 0.5 * (max - min)
> = 1.0 * min + 0.5 * max - 0.5 * min
> = 0.5 * min + 0.5 * max
> = 0.5 * (min + max)
You are right of course.
But why put that "1.0 + " on the first line?
I think of it (the first line), from my mid 20th Cent schooling, as:
Half of the difference between max and min plus the "offset" of min.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 16 May 2013 22:55:38 +0200, Christian Froeschlin <chr### [at] chrfrde>
wrote:
>>>> min_extent(Object)+.5*(max_extent(Object)-minExtent(Object))
>>>
>>> Or 0.5*(min + max) if you're a fan of distributive law ;)
>> It seems it's too long since I've done proper algebra. Your solution
>> makes perfect sense, yet can't seem to get from my solution to yours
>> algebraically.
>
> an algebraic mystification that is easily resolved ;)
>
> 1.0 * min + 0.5 * (max - min)
> = 1.0 * min + 0.5 * max - 0.5 * min
> = 0.5 * min + 0.5 * max
> = 0.5 * (min + max)
Of course. It helps to write it down and not just try and solve it in my
mind ;)
--
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 16 May 2013 23:17:42 +0200, Stephen <mca### [at] aolcom> wrote:
> On 16/05/2013 9:55 PM, Christian Froeschlin wrote:
>> an algebraic mystification that is easily resolved ;)
>>
>> 1.0 * min + 0.5 * (max - min)
>> = 1.0 * min + 0.5 * max - 0.5 * min
>> = 0.5 * min + 0.5 * max
>> = 0.5 * (min + max)
>
> You are right of course.
> But why put that "1.0 + " on the first line?
>
> I think of it (the first line), from my mid 20th Cent schooling, as:
> Half of the difference between max and min plus the "offset" of min.
>
It did help to clarify the issue though.
--
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |