It's the center of your model. This depends on your models vertices, and
whether you're changing the position of your model using glTranslate.
For example, if you use glTranslatef to translate to an other point like
this(you have to specify the variable ExtraDistance yourself):
glTranslatef(ExtraDistance.[0], ExtraDistance.[1], ExtraDistance.[2]);
And if you have both the smallest and the biggest vertices of a model(you
have to fetch them your self by comparing every pointL element from the
struct Lib3dsMesh using the min() and max() function) you can calculate it
like this:
vec3 PosModel;
for(int i = 0;i < 3;i++)
PosModel.[0] = (MaxVertex.[i] - MinVertex.[i])/2 + MinVertex.[i] +
ExtraDistance.[i];
I hope this makes sense :-)
Hylke
From: "sana anwar" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Lib3ds-devel] zooming priblem
Date: Wed, 31 May 2006 10:37:03 +0500
MIME-Version: 1.0
Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by
bay0-mc8-f4.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 30
May 2006 22:38:03 -0700
Received: from sc8-sf-list1-b.sourceforge.net
(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by sc8-sf-spam2.sourceforge.net
(Postfix) with ESMTPid D1971124D4; Tue, 30 May 2006 22:38:02 -0700 (PDT)
Received: from [10.3.1.93] (helo=sc8-sf-list1-new.sourceforge.net)by
sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30)id 1FlJOF-0006lU-8Jfor
[email protected]; Tue, 30 May 2006 22:37:07 -0700
Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92]
helo=mail.sourceforge.net)by sc8-sf-list1-new.sourceforge.net with esmtp
(Exim 4.43)id 1FlJOF-0004Oy-9Wfor [email protected]; Tue,
30 May 2006 22:37:07 -0700
Received: from wr-out-0506.google.com ([64.233.184.232])by
mail.sourceforge.net with esmtp (Exim 4.44)id 1FlJOC-00085s-Rnfor
[email protected]; Tue, 30 May 2006 22:37:05 -0700
Received: by wr-out-0506.google.com with SMTP id i11so145592wra for
<[email protected]>; Tue, 30 May 2006 22:37:03 -0700 (PDT)
Received: by 10.65.22.6 with SMTP id z6mr2497755qbi; Tue, 30 May 2006
22:37:03 -0700 (PDT)
Received: by 10.65.54.14 with HTTP; Tue, 30 May 2006 22:37:03 -0700 (PDT)
X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlKtU9j2Z7TuGo=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references;
b=UAlkxTmPajoTTvJxq17KxAYJ0Tayc2JHIT6Ed8Iwm3ItnhxIrvwkOaMGODknBsyRaOgUfPECcrsLtx27OLniuIOPoDu8SHIKMjpykWoq0kd1Ap9TX7SJT2e5J+ZKHQ6ouTAJbDR73YXoXzksmspV8HHnXs69TOj6Ua63JW3gMnI=
References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
X-Spam-Score: 0.7 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.See
http://spamassassin.org/tag/ for more details.Report problems to
http://sf.net/tracker/?func=add&group_id=1&atid=2000010.5 FROM_ENDS_IN_NUMS
From: ends in numbers0.0 RCVD_BY_IP Received by mail server
with no name0.1 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address
in URL0.1 HTML_40_50 BODY: Message is 40% to 50% HTML0.0
HTML_MESSAGE BODY: HTML included in message
Errors-To: [EMAIL PROTECTED]
X-BeenThere: [email protected]
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:[EMAIL PROTECTED]>
List-Id: Discussion about lib3ds <lib3ds-devel.lists.sourceforge.net>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Subscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:[EMAIL PROTECTED]>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=lib3ds-devel>
X-Original-Date: Wed, 31 May 2006 10:37:03 +0500
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 31 May 2006 05:38:03.0206 (UTC)
FILETIME=[629B5E60:01C68474]
Hi,
sorry for replying to late,but i m not on work.plz tell me PosModel is the
object of which lib3ds structure.
On 5/25/06, Hylke Donker <[EMAIL PROTECTED]> wrote:
I forgot the minus :-)
it's:
glTranslatef(PosModel.x*(1.0-1.0/ZoomFactor)*-1.0,
PosModel.y*(1.0-1.0/ZoomFactor)*-1.0, PosModel.z*(1.0-1.0/ZoomFactor)*1.0
);
Hylke
From: "Hylke Donker" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: RE: [Lib3ds-devel] zooming priblem
Date: Thu, 25 May 2006 15:43:35 +0000
MIME-Version: 1.0
X-Originating-IP: [84.87.190.2]
X-Originating-Email: [EMAIL PROTECTED]
X-Sender: [EMAIL PROTECTED]
Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by
bay0-mc5-f3.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu,
25
May 2006 08:44:07 -0700
Received: from sc8-sf-list1-b.sourceforge.net
(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by sc8-sf-spam1.sourceforge.net
(Postfix) with ESMTPid DC1748D2F6; Thu, 25 May 2006 08:44:06 -0700 (PDT)
Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91]
helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with esmtp (Exim
4.30)id 1FjI01-0006Vf-RGfor [email protected]; Thu, 25
May
2006 08:43:45 -0700
Received: from bay110-f37.bay110.hotmail.com ([65.54.229.47]
helo=hotmail.com)by mail.sourceforge.net with esmtp (Exim 4.44)id
1FjI01-0008TE-LBfor [email protected]; Thu, 25 May 2006
08:43:46 -0700
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Thu, 25 May 2006 08:43:37 -0700
Received: from 65.54.229.220 by by110fd.bay110.hotmail.msn.com with
HTTP;Thu, 25 May 2006 15:43:35 GMT
X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlK+3Wz9fWrJ/U=
X-OriginalArrivalTime: 25 May 2006 15:43:37.0096 (UTC)
FILETIME=[FCD08080:01C68011]
X-Spam-Score: 0.0 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.See
http://spamassassin.org/tag/ for more details.Report problems to
http://sf.net/tracker/?func=add&group_id=1&atid=2000010.0
MSGID_FROM_MTA_HEADER Message-Id was added by a relay
Errors-To: [EMAIL PROTECTED]
X-BeenThere: [email protected]
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:
[EMAIL PROTECTED]>
List-Id: Discussion about lib3ds <lib3ds-devel.lists.sourceforge.net>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[EMAIL PROTECTED]
?subject=help>
List-Subscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:
[EMAIL PROTECTED]>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=lib3ds-devel>
X-Original-Date: Thu, 25 May 2006 15:43:35 +0000
Return-Path: [EMAIL PROTECTED]
If it's a factor, you can do like this:
glPushMatrix();
glTranslatef(PosModel.x*(1-1/ZoomFactor), PosModel.y*(1-1/ZoomFactor),
PosModel.z*(1-1/ZoomFactor));
[do rendering or whatever]
glPopMatrix();
From: "sana anwar" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: [Lib3ds-devel] zooming priblem
Date: Thu, 25 May 2006 17:18:20 +0500
MIME-Version: 1.0
Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by
bay0-mc1-f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu,
25
May 2006 05:18:41 -0700
Received: from sc8-sf-list1-b.sourceforge.net
(sc8-sf-list1-b.sourceforge.net [10.3.1.7])by sc8-sf-spam2.sourceforge.net
(Postfix) with ESMTPid 77BE216A6A; Thu, 25 May 2006 05:19:02 -0700 (PDT)
Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91]
helo=mail.sourceforge.net)by sc8-sf-list1.sourceforge.net with esmtp (Exim
4.30)id 1FjEnQ-0005h0-37for [email protected]; Thu, 25
May
2006 05:18:32 -0700
Received: from wr-out-0506.google.com ([64.233.184.237])by
mail.sourceforge.net with esmtp (Exim 4.44)id 1FjEnL-00041i-UZfor
[email protected]; Thu, 25 May 2006 05:18:28 -0700
Received: by wr-out-0506.google.com with SMTP id 37so123973wra for
<[email protected]>; Thu, 25 May 2006 05:18:20 -0700
(PDT)
Received: by 10.65.233.20 with SMTP id k20mr1160497qbr; Thu, 25 May
2006 05:18:20 -0700 (PDT)
Received: by 10.65.52.6 with HTTP; Thu, 25 May 2006 05:18:19 -0700 (PDT)
X-Message-Info: LsUYwwHHNt0O13eQyPKZ+MxlNmGb+5QR8OPI7gKlDeA=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=
gmail.com;
h=received:message-id:date:from:to:subject:mime-version:content-type;
b=N6zfrye/NZmB+ev9tlt8pPnr5sBHmYu5k/rZL6e7wCe7JmU2Cupocdz6RigLxXI/yshluDW0Z+zMNMxolBmiq/se0IMjC0BiCcmqGyIPBJnxmG6fo7XMWzrPuFHhgnHfPz+Ma5+NwhFaMo5BhOdk+fifYsG7HcTAJJl1TOzKOt4=
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam Filtering performed by sourceforge.net.See
http://spamassassin.org/tag/ for more details.Report problems to
http://sf.net/tracker/?func=add&group_id=1&atid=2000010.5FROM_ENDS_IN_NUMS
From: ends in numbers0.0 RCVD_BY_IP Received by mail
server
with no name0.7 HTML_SHORT_LENGTH BODY: HTML is extremely short0.0
HTML_MESSAGE BODY: HTML included in message0.1 HTML_00_10
BODY: Message is 0% to 10% HTML
Errors-To: [EMAIL PROTECTED]
X-BeenThere: [email protected]
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:
[EMAIL PROTECTED]>
List-Id: Discussion about lib3ds <lib3ds-devel.lists.sourceforge.net>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[EMAIL PROTECTED]
?subject=help>
List-Subscribe:
<https://lists.sourceforge.net/lists/listinfo/lib3ds-devel>,<mailto:
[EMAIL PROTECTED]>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=lib3ds-devel>
X-Original-Date: Thu, 25 May 2006 17:18:20 +0500
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 25 May 2006 12:18:42.0131 (UTC)
FILETIME=[5C71BA30:01C67FF5]
r u saying that i can use the zoom factor in translation coordinates
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel