In lower classes, students are told that $\cos\theta=\dfrac{\text{base}}{\text{hypotenuse}}$. Then when they come to higher class, they are told that $\cos\theta=\dfrac{\text{base}}{\text{hypotenuse}}$ is only valid for right angle triangle.
So for giving the general definition, we draw a circle of radius $r$. A point $P(x,y)$ is taken on circle and radius vector $OP$ is drawn where $O$ is origin. Angle which radius vector makes with positive $X$ axis is considered to be $\theta$, then $\cos\theta=\dfrac{\text{ $x$ coordinates of point }}{\text{radius of circle}}$.
But this definition would only be valid when we have a coordinate plane, what if there is no coordinate plane. Suppose only a triangle is given to you and its angles and then you are asked calculate $\cos\theta,\sin\theta$ etc.
Also I don't understand the significance of definition of $\cos\theta$ in coordinate plane i.e $\cos\theta=\dfrac{\text{ $x$ coordinates of point }}{\text{radius of circle}}$. Please help in understanding this?