Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How can I check if a vector is normalized given the kernel ?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How can I check if a vector is normalized given the kernel ?


Chronological Thread 
  • From: 杨成林 <>
  • To:
  • Subject: Re: [cgal-discuss] How can I check if a vector is normalized given the kernel ?
  • Date: Fri, 13 Nov 2009 15:05:49 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=hIoReVbueJpUy38+oEUMnCKOOaP6hyQJr9MfdHmWl6o8HBOzFuPo+JjEb3kG/xxWMt oA8PqlSOfKbHdm1F0ldBnnu+/5d0oN3sK4CMk5igdbiudbfzF3GWJ/a1tiaZ07bxoeeT WgiM241EeO4wIZJW0gRItD1KMNYONv4Urmt28=

Projection does not need normalized vector. If you insist, you can use squared_length ()  .

2009/11/13 Priyank Jain <>
Hi,

Is there a way I can check if the vector is normalized or not ? I think this is a kernel dependent function since there are multiple data types that can be used, so I was wondering if something like that is available ?

Related to this, is there a function / functor which I can call to normalize the given vector ?

Also, I read this about directions: " They can be viewed as unit vectors, although there is no normalization internally, since this is error prone". After reading this, I am not sure how/when can I use Direction.

I have a projecting operation that I want to perform, something like this:

Point_3& newPoint = midPt + (direction * dist_Proj);

where midPt is a Point3,
direction = vector  (I want this to be a normalized vector)
dist_proj = double value

Can anyone please recommend me what would be a good way to do this in CGAL ?

Thank you
/Priyank Jain



--
杨成林
Yang Chenglin



Archive powered by MHonArc 2.6.16.

Top of Page